21.09.2011, 15:06
ah sim, nгo tinha visto:
pawn Код:
#include <a_samp>
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp("/rc", cmdtext, true))
{
SendClientMessageToAll(-1, "Algum administrador resetool todos os veiculos!");
ResetarCarros();
return 1;
}
return 0;
}
stock ResetarCarros() //Creditos: thegarfield
{
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);
}
}