Team vehicles
#9

Quote:
Originally Posted by Nero_3D
Посмотреть сообщение
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

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
Sorry im a crap scripter lol!

Ok, i have done like this now
pawn Код:
new Team1Car[22], Team2Car[22], Team3Car[22], Team4Car[22];
public OnPlayerEnterVehicle(playerid, vehicleid)
{
    for(new var; var < 22; var++)
    {
And if i put it in OnPlayerStateChange i get error, and even more if i define it
pawn Код:
error 017: undefined symbol "vehicleid"
And how about this stock?
pawn Код:
stock TeamCar[4][22]; //2d arrays, looks more clear
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)