Jump to content

Check if i vehicle is locked/unlocked (NEED HELP)


Recommended Posts

SO essentially I'm trying to write a script which will let players booby trap an unlocked vehicle and the layout of it so far is this.

Check if the vehicle is unlock, if it is then run the plant script, else end with "Cannot booby trap this vehicle."

 

All i want to know is how or where i can find out how to write the first part which checks if the target vehicle (cursorTarget or something like that) is locked or not.

 

Thanks :D

Link to comment
Share on other sites

Would you know how to make a vehicle explode when the engine is started? I wrote the code for the init which is:

if !(locked _cursorTarget) then {
	_trap = player addAction [("<t color='#FF0000'>Plant Bomb</t>"), "Custom\Traps\vehicleTrap_plant.sqf", _cursorTarget, 0, false, true, "",""];
} else {
	exitWith { cutText ["A locked vehicle cannot be booby trapped.","PLAIN DOWN"]; };
};

now i have to write the vehicleTrap_plant.sqf and pretty much just need to create a trigger that when that specific vehicle's engine is started it will explode.

Thanks heaps :D

Link to comment
Share on other sites

4 hours ago, braydenrox55 said:

Would you know how to make a vehicle explode when the engine is started? I wrote the code for the init which is:


if !(locked _cursorTarget) then {
	_trap = player addAction [("<t color='#FF0000'>Plant Bomb</t>"), "Custom\Traps\vehicleTrap_plant.sqf", _cursorTarget, 0, false, true, "",""];
} else {
	exitWith { cutText ["A locked vehicle cannot be booby trapped.","PLAIN DOWN"]; };
};

now i have to write the vehicleTrap_plant.sqf and pretty much just need to create a trigger that when that specific vehicle's engine is started it will explode.

Thanks heaps :D

 

I think there are car bombs in 1.0.6 you could just wait till then it should be out quite soon

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Discord

×
×
  • Create New...