21.09.2011, 02:25
Quote:
pawn Код:
pawn Код:
|
pawn Код:
if(!strcmp("/rc", cmdtext, true)) return ResetarCarros(playerid);
pawn Код:
stock ResetarCarros(playerid)
{
new
Nome[MAX_PLAYER_NAME],
sStr[27 + MAX_PLAYER_NAME]
;
GetPlayerName(playerid, Nome, sizeof(Nome));
format(sStr, sizeof(sStr), "%s respawnou todos os carros!", Nome);
SendClientMessageToAll(-1, sStr);
static bool:inVeh;
for(new i; i < MAX_VEHICLES; i++ )
{
inVeh = false;
for(new j; j < GetMaxPlayers(); j++ )
{
if(IsPlayerInVehicle(j, i))
inVeh = true;
break;
}
if(!inVeh) SetVehicleToRespawn(i);
}
return 1;
}