HELP +REP
#7

Quote:
Originally Posted by Jefff
Посмотреть сообщение
pawn Код:
forward RACtime();
public RACtime()
{
    static vehID, trailerid;
    new bool:unwanted[CAR_AMOUNT char];

    for(new player=0; player<MAX_PLAYERS; player++)
        if(IsPlayerConnected(player))
        {
            vehID = GetPlayerVehicleID(player);
            if(!(0 < vehID < CAR_AMOUNT)) continue; // if player is not in any vehicle we skip
            unwanted{vehID} = true;

            trailerid = GetVehicleTrailer(vehID);
            if(0 < trailerid < CAR_AMOUNT) // if trailer is attached
                unwanted{trailerid} = true;
        }

    for(new car = 1; car < CAR_AMOUNT; car++)
        if(!unwanted{car} && GetVehicleModel(car) > 0) // or https://sampwiki.blast.hk/wiki/IsValidVehicle instead GetVehicleModel
            SetVehicleToRespawn(car);
}
Stick to one thread...
Reply


Messages In This Thread
HELP +REP - by KingPersona - 11.05.2015, 18:26
Re: HELP +REP - by Crayder - 11.05.2015, 23:31
Re: HELP +REP - by Sithis - 12.05.2015, 08:25
Re: HELP +REP - by KingPersona - 14.05.2015, 22:10
Re: HELP +REP - by Crayder - 14.05.2015, 22:35
Re: HELP +REP - by KingPersona - 15.05.2015, 10:39
Re: HELP +REP - by Threshold - 15.05.2015, 10:55
Re: HELP +REP - by keyvanik - 15.05.2015, 12:37
Re: HELP +REP - by Smileys - 15.05.2015, 13:25
Re: HELP +REP - by KingPersona - 15.05.2015, 13:28

Forum Jump:


Users browsing this thread: 2 Guest(s)