24.04.2013, 13:26
Olб
Tenta usar o comando assim;
E a stock assim;
PT
Tenta usar o comando assim;
pawn Code:
if(strcmp(cmd, "/rv", true) == 0)
{
new ptname[MAX_PLAYER_NAME];
GetPlayerName(playerid, ptname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, ptname);
if(pAdmin[playerid] > 0)
{
for(new v = 0; v < MAX_VEHICLES; v++)
{
if(!IsVehicleOccupied(v)) SetVehicleToRespawn(v);
}
SendClientMessage(playerid, Verde, "Veнculos desocupados respawnados!");
format(string, sizeof(string), "O(A) ADM %s (%d) respawnou todos os veнculos desocupados.", ptname, playerid);
SendClientMessageToAll(tcadm, string);
}
return 1;
}
pawn Code:
stock IsVehicleOccupied(vid)
{
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) == vid)
{
return 1;
}
}
}
}
return 0;
}
PT