Way of Passenger?

Started by FarisDon, Feb 05, 2016, 03:03 PM

Previous topic - Next topic

FarisDon

Well, is their any way to make the player sit in the Car as the Passenger?
As, for me, I guess Player.PutInVehicleSlot could be used to make it sit as the passenger, but it could be wrong as well, so may you tell me is their any way to make the player sit as a passenger :(?
P.S: Sorry, for my bad English :(

DizzasTeR

It'll be better if I never see a question from you in which you ask something like 'Will it work?' or 'It could be wrong?'

Just one two words for you: Try it.

FarisDon

#2
Quote from: Doom_Kill3R on Feb 05, 2016, 03:11 PMIt'll be better if I never see a question from you in which you ask something like 'Will it work?' or 'It could be wrong?'

Just one two words for you: Try it.
Well, Sorry, my English, but i've tried before than, I even posted. : | I guess it didn't worked cause i don't have any proper syntax! also i tried my best to find it......
If you are gonna ask for the Error : -
 Member Variable not found
tried many ways, for example : -
player.PutInVehicleSlot = ( 1(ID), 2(slot as passenger, cause i think 1st, for driver);
local veh = player.Vehicle;
Player.PutInvehSlot =  veh;
and etc. : [

Thijn

It's a function, not a variable. So use player.PutInVehicleSlot( id )

FarisDon

Quote from: Thijn on Feb 05, 2016, 04:28 PMIt's a function, not a variable. So use player.PutInVehicleSlot( id )
So, is their no way to enter the person as a passenger : [?

.

Well, if you look at the player class API I posted here.

[null] PutInVehicleSlot( [CVehicle] vehicle, [integer] slot );
You would see that you need to specify the vehicle instance and the slot where the player should occupy. Just try and play with random numbers and see which slot number is the driver and which is the passenger.

Like:
player.PutInVehicleSlot(my_vehicle, 0); // Place player in slot 0
Or:
player.PutInVehicleSlot(my_vehicle, 1); // Place player in slot 1
And so on...
.

FarisDon

#6
Uhm, Alrighty! S.L.C, it worked perfect, however, I actually knew ID = 1, is going to be surely passenger, and I want to ask one thing, is their anyway that I can even check that if their is someone in slot 1,2, and etc?

Gudio

vehicle.GetOccupant( slotID );

FarisDon