Advertisement
toribio

toribio

Feb 21st, 2009
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.97 KB | None | 0 0
  1. if(!strcmp(ComandoBefore, "/ecarro", true))
  2. {
  3.     if(IsPlayerAdmin(playerid))
  4.     {
  5.         new id, pname[MAX_PLAYER_NAME], tmp[256];
  6.         tmp = StringSplit(cmdtext, PosDelimitador);
  7.         if(!strlen(tmp) || !IsNumeric(tmp))
  8.         {
  9.             SendClientMessage(playerid, Laranja, "Use: /ecarro [carro id]");
  10.             return 1;
  11.         }
  12.         id = strval(tmp);
  13.         if(id < 400 || id > 607)
  14.         {
  15.             SendClientMessage(playerid, 0xFF0000AA, "[ERRO] Este veiculo invlido!");
  16.             return 1;
  17.         }
  18.         for(new i; i < MAX_PLAYERS; ++i)
  19.         {
  20.             if(IsPlayerInEvent[i])
  21.             {
  22.                 GetPlayerPos(i, x, y, z);
  23.                 GetPlayerFacingAngle(i, a);
  24.                 PutPlayerInVehicle(i, CreateVehicle(id, x, y, z, a, -1, -1, 2000), 0);
  25.             }
  26.         }
  27.         GetPlayerName(playerid, pname, sizeof pname);
  28.         format(string, sizeof string, "O Administrador %s deu para todos do evento o carro %s.",
  29.             pname, NomesVeiculos[id-400]);
  30.         MessageToAdmins(Evento,string);
  31.     } else {
  32.         SendClientMessage(playerid, 0xFF0000AA, "[ERRO] Voc no admin!");
  33.     }
  34.     return 1;
  35. }
  36.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement