[Ajuda] Comando de rvs
#7

Tenta esse do Gm da Dten.
Quote:

if(strcmp(cmd, "/rvu", true) == 0)
{
new string[128];
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(0x33AAFFFF, string);
SendClientMessage(playerid, 0x00D700AA, "Veнculos desocupados respawnados!");
return 1;
}

No final do GM:
Quote:

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;
}

Reply


Messages In This Thread
Comando de rvs - by Tekken - 05.11.2013, 18:34
Re: Comando de rvs - by CharlieBrown - 05.11.2013, 18:44
Re: Comando de rvs - by yNexus - 05.11.2013, 18:47
Re: Comando de rvs - by Chazika - 05.11.2013, 18:57
Re: Comando de rvs - by PT - 05.11.2013, 20:21
Re: Comando de rvs - by Gyss - 05.11.2013, 21:44
Re: Comando de rvs - by Mateus_. - 05.11.2013, 23:23

Forum Jump:


Users browsing this thread: 1 Guest(s)