Jump to content
Sign in to follow this  
Kolmain

Determine What side vehicle the player is in?

Recommended Posts

I need to detect if the player is in a civilian vehicle? Any ideas?

Share this post


Link to post
Share on other sites

cfgVehicles will give you the answer, but i dont have it on hand.

But if west player is in control of civilian vehicle i think side vehicle will give west when you use (side (vehicle player)) maybe youre lucky and it doesnt.

Share this post


Link to post
Share on other sites

Nope, vehicles are the side of the commander :( anyone know how to use CfgVehicles?

Share this post


Link to post
Share on other sites

Not sure how you might implement this is your case but maybe _veh setvariable ["side","CIV"]; ... and then do the check.

Share this post


Link to post
Share on other sites

this works:

_side = west;
_classname = typeOf (vehicle player);
_sv = getNumber (configFile >> "CfgVehicles" >> _classname >> "Side");
switch (_sv) do {
case 0: {_side = east};
case 1: {_side = west};
case 2: {_side = resistance};
case 3: {_side = civilian};
};
hint format ["side of vehicle is %1",_side];

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×