Advertisement
Guest User

Untitled

a guest
Sep 30th, 2014
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     if(strcmp(cmd, "/e_carro", true) == 0)
  2.     {
  3.         if(PlayerInfo[playerid][pAdmin] >= 4)
  4.         {
  5.             if(EventoAberto == 1)
  6.             {
  7.                 tmp = strtok(cmdtext, idx);
  8.                 if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_RED, "{339933}[Use]{FFFFFF} /e_carro [Modelo]");
  9.                 new id = strval(tmp);
  10.                 for(new card = 0; card < MAX_VEHICLES; card++)
  11.                 {
  12.                     if(CarInfo[card][cEvento] == 1)
  13.                     {
  14.                         if(CarInfo[card][cEventoPuxado] == 0)
  15.                         {
  16.                             CarInfo[card][cModel] = id;
  17.                             DestroyVehicle(card);
  18.                            
  19.                             ownedcar[card] = AddStaticVehicleEx(CarInfo[card][cModel],CarInfo[card][cLocationx],CarInfo[card][cLocationy],CarInfo[card][cLocationz]+1.0,CarInfo[card][cAngle],CarInfo[card][cColorOne],CarInfo[card][cColorTwo],60000);
  20.                             new Float:plocx,Float:plocy,Float:plocz;
  21.                             GetPlayerPos(playerid, plocx, plocy, plocz);
  22.                             format( string, sizeof( string ), "Você puxou o veiculo %d de eventos.", card);
  23.                             SendClientMessage( playerid, COLOR_WHITE, string);
  24.                             CarInfo[card][cEventoPuxado] = 1;
  25.                             SetVehiclePos(card,plocx+8,plocy, plocz);
  26.                             LinkVehicleToInterior(card, GetPlayerInterior(playerid));
  27.                             SetVehicleVirtualWorld(card, GetPlayerVirtualWorld(playerid));
  28.                             OnPropUpdate(4, card);
  29.                             return 1;
  30.                         }
  31.                     }
  32.                 }
  33.             }
  34.             else return SendClientMessage(playerid, COLOR_WHITE, "Não há nenhum evento aberto.");
  35.         }
  36.         return 1;
  37.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement