Respawn all unused cars by model
#3

pawn Код:
COMMAND:respawncars(playerid,params[])
{
    for(new i = 0; i<MAX_VEHICLES; i++)
    {
        if(GetVehicleModel(i) == Car model here)
        {
            if(!IsVehicleOccupied(i))
            {
                SetVehicleToRespawn(i);
            }
        }
    }
    return 1;
}
Wrong section, but i've tested, it works fine for me you need zcmd for it to work.

edit: heres the stock

pawn Код:
stock IsVehicleOccupied(vehicleid)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
        if(IsPlayerInVehicle(i, vehicleid) && GetPlayerState(i) == PLAYER_STATE_DRIVER)
            return 1;
    return 0;
}
Reply


Messages In This Thread
Respawn all unused cars by model - by deimantas1 - 07.07.2013, 19:30
Re: Respawn all unused cars by model - by Jefff - 07.07.2013, 19:53
Re: Respawn all unused cars by model - by DobbysGamertag - 07.07.2013, 19:54
Re: Respawn all unused cars by model - by deimantas1 - 07.07.2013, 20:06

Forum Jump:


Users browsing this thread: 1 Guest(s)