05.11.2013, 21:44
tenta assim
e no final do Game Mod coloque isso
pawn Код:
if(strcmp(cmd, "/rvu", true) == 0)
{
if(pAdmin[playerid] >= 2)
{
for(new v = 0; v < MAX_VEHICLES; v++)
{
if(!IsVehicleOccupied(v)) SetVehicleToRespawn(v);
}
format(string, sizeof(string), "O(A) ADM %s (%d) respawnou todos os veнculos desocupados.", GetPlayerNameEx(playerid), playerid);
SendClientMessageToAll(tcadm, string);
SendClientMessage(playerid, Verde, "Veнculos desocupados respawnados!");
}
return 1;
}
pawn Код:
stock IsVehicleOccupied(vehicleid)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(GetPlayerState(i) == PLAYER_STATE_DRIVER || GetPlayerState(i) == PLAYER_STATE_PASSENGER)
{
if(GetPlayerVehicleID(i) == vehicleid)
{
return 1;
}
}
}
}
return 0;
}