Advertisement
Shiny_

Untitled

Sep 7th, 2013
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.93 KB | None | 0 0
  1. PUBLIC OnPlayerCommandText(int playerid, const char * cmdtext) {
  2.         char str[128];
  3.         if(strcmp_n(cmdtext, "/yo")) {
  4.             char Name[MAX_PLAYER_NAME];
  5.             GetPlayerName(playerid, Name, sizeof(Name));
  6.            
  7.             char MSG[128];
  8.             sprintf(MSG, "Yo, %s", Name);
  9.             SendClientMessage(playerid, -1, MSG);
  10.             return true;
  11.         }
  12.         if(strcmp_n(cmdtext, "/infernus")) {
  13.             float Pos[4];
  14.             GetPlayerPos(playerid, &Pos[0], &Pos[1], &Pos[2]);
  15.             GetVehicleZAngle(GetPlayerVehicleID(playerid), &Pos[3]);
  16.             CreateVehicle(411, Pos[0], Pos[1], Pos[2], Pos[3], -1, -1, 1500);
  17.             SendClientMessage(playerid, -1, "Tworzysz Infernusa.");
  18.             return true;
  19.         }
  20.         if((Vehicle[playerid] = GetVehicleModelIDFromName(cmdtext)) != -1) {
  21.             str_del_free_space(cmdtext);
  22.             CreatePlayerVehicle(playerid, GetVehicleModelIDFromName(cmdtext));
  23.             return false;
  24.         }
  25.         else return sprintf(str, "Komenda %s nie istnieje.", cmdtext), SendClientMessage(playerid, -1, str);
  26.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement