Team vehicles help
#5

Rather than hardcoding state 4, you could use DRIVER. You may want to check if they are PASSENGER as well. Otherwise an enemy team member could get into the vehicle as passenger.

As for the team per vehicle issue, you should use an array/enum to track what team that vehicle is assigned to, so when you check, you're not having to check what vehicle they are in, you simply check it's team versus the players team.

The reason this was doing what it was doing is...

Код:
	Veh[Taliveh] = AddStaticVehicle(568,-1565.5852,2638.3340,55.6556,89.3129,1,1); // ALL_CAN_ENTER
	Veh[Taliveh] = AddStaticVehicle(470,-1563.2689,2694.5530,55.7585,179.6360,1,1); // ALL_CAN_ENTER
	Veh[Taliveh] = AddStaticVehicle(469,-1276.0333,2490.6409,86.9348,151.4670,1,1); // TALI_CANNOT_ENTER
You're reassigning Veh[Taliveh] each time you are doing this... They don't stack, it is one variable.

So the first 2 weren't being Veh[Taliveh] by the time the third one had it assigned.
Reply


Messages In This Thread
Team vehicles help - by Zmith - 20.03.2017, 01:39
Re: Team vehicles help - by Zmith - 20.03.2017, 01:59
Re: Team vehicles help - by azzerking - 20.03.2017, 02:45
Re: Team vehicles help - by Zmith - 20.03.2017, 03:54
Re: Team vehicles help - by Sew_Sumi - 20.03.2017, 04:34

Forum Jump:


Users browsing this thread: 1 Guest(s)