Vehicleid variable when player leaves
#3

Quote:
Originally Posted by TwinkiDaBoss
Посмотреть сообщение
Why dont you link it to Vehicle ID instead?

Ie:
When you create a vehicle, store it inside
2 variables

PHP код:
new Car[MAX_VEHICLES]; //assign the car into some ID 
And then after the car is created, assign the car to the player
PHP код:
MyCar[playerid] = Car[vehicleid]; 
So now when you enter a car, you can check if MyCar[playerid] matched Car[vehicleid]
Hmm, I've been up 24 hours so sorryif I'm playing up here but, my spawning command is something like this:

Код:
Vehicle[playerid] = CreateVehicle(VehicleInfo[playerid][vModel], VehicleInfo[playerid][vX],VehicleInfo[playerid][vY],VehicleInfo[playerid][vZ],VehicleInfo[playerid][vAngle],VehicleInfo[playerid][vColor1],VehicleInfo[playerid][vColor2],60 * 1000000);
	
Vehicle[playerid] = Car[vehicleid];
And I'd get a undefined symbol "vehicleid".. so uhh.

And if they leave, i reset the variable vehicle[playerid] so then when they rejoin how would i connect Car[vehicleid] to the new Vehicle[playerid]?
Reply


Messages In This Thread
Vehicleid variable when player leaves - by izeatfishz - 24.12.2015, 16:38
Re: Vehicleid variable when player leaves - by TwinkiDaBoss - 24.12.2015, 16:45
Re: Vehicleid variable when player leaves - by izeatfishz - 24.12.2015, 16:52
Re: Vehicleid variable when player leaves - by TwinkiDaBoss - 24.12.2015, 16:55
Re: Vehicleid variable when player leaves - by izeatfishz - 24.12.2015, 17:00
Re: Vehicleid variable when player leaves - by TwinkiDaBoss - 24.12.2015, 17:06

Forum Jump:


Users browsing this thread: 1 Guest(s)