Respawn all empty cars
#1

I got this command for admins which calls this Stock, When i do it, even if a player is in the car it still respawns the car. It's only suppose to respawn cars that people are not in. Whats wrong with the code? I don't see anything wrong with it

pawn Код:
if(strcmp(cmd, "/resallemptycars", true) == 0) {
        if(PlayerInfo[playerid][pAdmin] >= 3) {
            RespawnAllEmptyCars();
            SendClientMessageToAll(COLOR_RED, "[ADMIN] An Admin Has respawned all the empty cars");
            return 1;
        }
    }
pawn Код:
stock RespawnAllEmptyCars()
{
    for(new i = 0; i < GetMaxPlayers(); i++)
        for(new v;v<MAX_VEHICLES;v++)
            if(!IsPlayerInVehicle(i, v))SetVehicleToRespawn(v);
}
Reply


Messages In This Thread
Respawn all empty cars - by ihatetn931 - 16.08.2010, 17:38
Re: Respawn all empty cars - by CT_Ronnie_Deo - 16.08.2010, 17:54
Re: Respawn all empty cars - by Dark_Kostas - 16.08.2010, 18:13
Re: Respawn all empty cars - by Kidel - 16.08.2010, 18:28

Forum Jump:


Users browsing this thread: 1 Guest(s)