Advertisement
Shiny_

Untitled

Aug 29th, 2013
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.73 KB | None | 0 0
  1.  
  2.     public OnPlayerCommandReceived(playerid, cmdtext[]) {
  3.         if(GetVehicleModelIDByName(cmdtext) != -1) {
  4.             Vehicle[playerid] = GetPlayerVehicleID(playerid);// car = GetPlayerVehicleID(playerid);
  5.         }
  6.         if(Vehicle[playerid] == -1) return SendClientMessage(playerid, -1, "Zła nazwa pojazdu.");
  7.         str_del_free_space(cmdtext);
  8.         CreatePlayerVehicle(playerid, GetVehicleModelIDByName(cmdtext));
  9.         return false;
  10.     }
  11.    
  12.     public OnPlayerCommandPerformed(playerid, cmdtext[], success) {
  13.         new text[100];
  14.         if(!success) {
  15.             format(text, sizeof(text), "Na serwerze nie ma takiej komendy jak %s!", cmdtext);
  16.             SendClientMessage(playerid, -1, text);
  17.         }
  18.         printf("%s wpisuje komendę: %s", PlayerName(playerid), cmdtext);
  19.         return true;
  20.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement