HELP +REP
#4

Quote:
Originally Posted by Crayder
Посмотреть сообщение
pawn Код:
forward RACtime(); public RACtime()
{
    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 <= 420; car++) if(!unwanted[car] || IsTrailerAttachedToVehicle(player))
        SetVehicleToRespawn(car);
}
I don't know wtf CAR_AMOUNT is, so this might not work... But if it's just a MAX_VEHICLES type of thing, then the following code will work perfect for 0.3.7:
pawn Код:
forward RACtime(); public RACtime()
{
    new bool:unwanted[CAR_AMOUNT];
    for(new player=0; player < GetPlayerPoolSize(); player++) if(IsPlayerInAnyVehicle(player))
        unwanted[GetPlayerVehicleID(player)]=true;
    for(new car; car < GetVehiclePoolSize(); car++) if(!unwanted[car] || IsTrailerAttachedToVehicle(player))
        SetVehicleToRespawn(car);
}
Thanks for help and ur answer , i get error(
Код:
error 017: undefined symbol "player"
pawn Код:
for(new car; car < GetVehiclePoolSize(); car++) if(!unwanted[car] || IsTrailerAttachedToVehicle(player))
and i get warning in MAX_VEHICLES,
pawn Код:
warning 201: redefinition of constant/macro (symbol "MAX_VEHICLES")
i define it
pawn Код:
#define MAX_VEHICLES 600
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)