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