24.10.2012, 22:34
Quote:
Thats the bit i had a problem with! I can only get a vehicle id that a player is using and i Dont need that
|
PHP код:
if(strcmp(cmd, "/rac", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] < 1337)
{
SendClientMessage(playerid, COLOR_GRAD1, " You are not authorized to use that command");
return 1;
}
new bool:unwanted[CAR_AMOUNT];
for(new player=0; player<MAX_PLAYERS; player++)
{
if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
}
for(new car = 1; car <= 699; car++)
{
if(!unwanted[car]) SetVehicleToRespawn(car);
}
format(string, sizeof(string), "AdmWarning: %s(%d) has respawned all the cars!", sendername,playerid);
ABroadCast(COLOR_LIGHTRED,string, 1);
}
return 1;
}