Author Topic: if vehicle driver (SOLVED)  (Read 497 times)

how do I check if someone in a vehicle is in the driver seat of it? (even if they are not controlling the vehicle)

Code: [Select]
%Client.Player.isPilotwill return if your in seat 0 or not
« Last Edit: February 20, 2012, 07:52:35 PM by swollow »

Well, you can check if they're in slot 0 which is the slot that controls vehicles.

Code: [Select]
%vehicle = %player.getMountObject();
if(%vehicle.getMountedObject(0) == %player)
{
//your stuff here
}

Pretty sure there's a .getDriver() method.

Code: [Select]
for(%i=0;%i<%Client.Minigame.NumMembers;%i++)
{
%Target = %Client.Minigame.Member[%i];
if(isObject(%Target.Player))
{
%Vehicle = %Target.Player.getObjectMount();

if(!isObject(%Vehicle))
return;

if(%Vehicle.GetMountedObject(0) == %Target.Player)
{
%Target.Player.SetControlObject(%Vehicle);
}
}
}
This will still get everyone in the vehicle how would I fix this?

and getDriver() is not a valid function