21.09.2011, 01:53
Quote:
pawn Код:
|
pawn Код:
if(strcmp("/rc", cmdtext, true, 3) == 0) return ResetarCarros();
pawn Код:
stock ResetarCarros()
{
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);
new 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;
}