Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(strcmp(cmd, "/e_carro", true) == 0)
- {
- if(PlayerInfo[playerid][pAdmin] >= 4)
- {
- if(EventoAberto == 1)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_RED, "{339933}[Use]{FFFFFF} /e_carro [Modelo]");
- new id = strval(tmp);
- for(new card = 0; card < MAX_VEHICLES; card++)
- {
- if(CarInfo[card][cEvento] == 1)
- {
- if(CarInfo[card][cEventoPuxado] == 0)
- {
- CarInfo[card][cModel] = id;
- DestroyVehicle(card);
- 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);
- new Float:plocx,Float:plocy,Float:plocz;
- GetPlayerPos(playerid, plocx, plocy, plocz);
- format( string, sizeof( string ), "Você puxou o veiculo %d de eventos.", card);
- SendClientMessage( playerid, COLOR_WHITE, string);
- CarInfo[card][cEventoPuxado] = 1;
- SetVehiclePos(card,plocx+8,plocy, plocz);
- LinkVehicleToInterior(card, GetPlayerInterior(playerid));
- SetVehicleVirtualWorld(card, GetPlayerVirtualWorld(playerid));
- OnPropUpdate(4, card);
- return 1;
- }
- }
- }
- }
- else return SendClientMessage(playerid, COLOR_WHITE, "Não há nenhum evento aberto.");
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement