02.04.2011, 15:37
I can only refer to my last topic -> [Include] Group Macros
But if you want a solution for your code
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
Now your actually problem was your loop
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
But if you want a solution for your code
Quote:
Hello!
The thing is that you can enter all team vehicles even if you not belong to that team, why? |
The size of the biggest one, also 22
pawn Код:
stock TeamCar[4][22]; //2d arrays, looks more clear
pawn Код:
for(new var; var < 18; var++)
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