Team vehicles
#8

I can only refer to my last topic -> [Include] Group Macros

But if you want a solution for your code

Quote:
Originally Posted by cruising
Посмотреть сообщение
Hello!
The thing is that you can enter all team vehicles even if you not belong to that team, why?
You got 4 arrays and for your code in OnPlayerEnterVehicle they need to have all the same size
The size of the biggest one, also 22

pawn Код:
stock TeamCar[4][22]; //2d arrays, looks more clear
Now your actually problem was your loop
pawn Код:
for(new var; var < 18; var++)
which only went to 18 ? why 18, dunno, it should loop till sizeof TeamCar[] (22)

Than another problem why your code would never work
Because in OnPlayerEnterVehicle the player enters the vehicle
So he cant be removed if he isnt in it
Just move your loop in OnPlayerStateChange

Another thing you could do would be to seperate the loops so you dont need to change the size of the arrays
Reply


Messages In This Thread
Team vehicles - by cruising - 02.04.2011, 13:55
Re: Team vehicles - by CyNiC - 02.04.2011, 14:00
Re: Team vehicles - by tanush - 02.04.2011, 14:15
Re: Team vehicles - by cruising - 02.04.2011, 14:26
Re: Team vehicles - by cruising - 02.04.2011, 14:33
Re: Team vehicles - by LiamM - 02.04.2011, 14:39
Re: Team vehicles - by cruising - 02.04.2011, 15:20
AW: Team vehicles - by Nero_3D - 02.04.2011, 15:37
Re: AW: Team vehicles - by cruising - 02.04.2011, 16:01
AW: Re: AW: Team vehicles - by Nero_3D - 02.04.2011, 16:11
Re: Team vehicles - by cruising - 02.04.2011, 16:33
Re: Team vehicles - by tanush - 03.04.2011, 14:09

Forum Jump:


Users browsing this thread: 1 Guest(s)