26.02.2009, 21:48
pawn Код:
#define MAX_CARS 700 //change to your car ammount
if(strcmp(cmd, "/respawncars", true) == 0)
{
if(IsPlayerAdmin(playerid)) //for rcon admin
{
for(new i=0; i<MAX_CARS; i++)
{
for(new pl = 0; pl<MAX_PLAYERS; pl++)
{
if(IsPlayerConnected(pl))
{
if(!IsPlayerInVehicle(pl, i) {SetVehicleToRespawn(i); return 0;}
}
}
}
}
else SendClientMessage(playerid, color, "You're not an admin"); //change color to your color code
return 1;
}