Advertisement
Shiny_

Untitled

Sep 25th, 2013
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.75 KB | None | 0 0
  1.     public OnPlayerCommandPerformed(playerid, cmdtext[], success) {
  2.         new GetVehicleModelVariable = GetVehicleModelIDByName(cmdtext);
  3.         if(!success) {
  4.             for(new i; i < sizeof(gVehicleNames); i++) {
  5.                 if(strlen(cmdtext) > 2 && !strcmp(cmdtext[1], gVehicleNames[i], true)) {
  6.                     delete_free_space(cmdtext);
  7.                     CreatePlayerVehicle(playerid, i + 400);
  8.                     format(text_, sizeof(text_), "Pojazd o nazwie {FF0000}%s{FFFFFF} zostaje utworzony.", gVehicleNames[i]);
  9.                     SendClientMessage(playerid, -1, text_);
  10.                     return true;
  11.                 }
  12.             }
  13.             format(text_, sizeof(text_), "Na serwerze nie ma takiej komendy jak %s!", cmdtext);
  14.             SendClientMessage(playerid, -1, text_);
  15.             printf("%s wpisuje komendę: %s", PlayerName(playerid), cmdtext);
  16.         }
  17.         return true;
  18.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement