Jump to content
Mattmad1234

Deploy a Bike when a player has a Tool-Kit

Recommended Posts

I am looking to see if there is a way using a script that allows a player that has a Tool-Kit in their inventory to deploy a bike. I'm not very experienced with scripting or anything so i don't know if this is even possible. 

Share this post


Link to post
Share on other sites

To check for Toolkit see here:

I'd start with the basic:

1. start your person off with toolkit

2. check if the condition from thread above returns true

3. create a quad at cursortarget if condition is true

 

then you could add an action to players that has the toolkit check as a condition... add an animation, maybe a broken down bike and that turns into a working bike after a certain time...

Share this post


Link to post
Share on other sites

Simple script for ya:

 

Players init:

player addAction ["Make Quad", {[] execVM "makeQuad.sqf"}];

 

Make a .sqf file named: makeQuad.sqf      <---- place that in your missions folder

_items = items player;

if ("ToolKit" in _items) then {

	_veh = "B_Quadbike_01_F" createVehicle getPos player;
	player removeItem "ToolKit";

}
else
{

	hint "Sorry mate, no Quad for you..."

};

You could add more code to take away the action, add an animation,  etc. but here's a basic script for it.

 

If you want a bike replace "B_Quadbike_01_F" with the bike's class name.

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

×