[AJUDA] Respawnveiculos
#3

Assim:
pawn Код:
if (strcmp("/respawnveiculos", cmdtext, true, 10) == 0)
if(IsPlayerAdmin(playerid)){
for(new v; v<MAX_VEHICLES; v++){
SetVehicleToRespawn(v);
}
SendClientMessage(playerid, COLOR_WHITE, "Veiculos respawnados com secesso!.");
return 1;
}
Irб funcionar, agora se quiser adcionar o que o cara de cima postou, й bom, ficarб assim:
pawn Код:
if (strcmp("/respawnveiculos", cmdtext, true, 10) == 0)
if(IsPlayerAdmin(playerid)){
for(new v; v<MAX_VEHICLES; v++){
if(!IsVehicleOccupied(v)) SetVehicleToRespawn(v);
}
SendClientMessage(playerid, COLOR_WHITE, "Veiculos respawnados com secesso!.");
return 1;
}

stock IsVehicleOccupied(vehicleid)
{
for(new i = 0; i < MAX_PLAYERS; i++)//ou foreach, ou GetMaxPlayers, o que preferir
if(IsPlayerInVehicle(i, vehicleid) && GetPlayerState(i) == PLAYER_STATE_DRIVER)
return 1;
return 0;
}
Reply


Messages In This Thread
[AJUDA] Respawnveiculos - by [RoxX]Ygor - 29.08.2010, 20:06
Re: [AJUDA] Respawnveiculos - by BlackFin - 29.08.2010, 20:34
Re: [AJUDA] Respawnveiculos - by CyNiC - 29.08.2010, 20:57

Forum Jump:


Users browsing this thread: 1 Guest(s)