Jump to content
Sign in to follow this  
braydenrox55

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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Similar Content

    • By Adam1911
      We are We are pleased to announce the launch of our arma 2 Overpoch DayZ server, we are a PvE with a PvP aspect, What we mean by this is our server supports both play styles we have a zone on our map that you are allowed to base raid and kill others as you would find on a normal pvp server. Doing this we have been growing a community and getting a foot hold in the arma 2 community, we also welcome all Suggestions you can do this by joining our discord or our website (Website Offline for now) 
      We can offer you a unique experience while playing on our servers with great peoples, Fair adult and mature staff.
      Experienced staff with experience and successful servers from Arma 2 to Arma 3, Enjoyable game experience with a lot to do. We will enforce the rules as strongly as we can to get rid of any peoples trying to break this great experience for us.
       
      Features: 
      Full Day / Night cycle (No Voting) Time Acceleration.  Build Limit is based on your humanity, the higher your humanity the more objects you can build.   Indestructible Bases with in the PvE Zone Only. Custom AI Missions. Custom Loot. Realistic Towing. Slow Zombies (still a threat and more of them.) Self Blood Bag. Air drops. Snap Building. Coin System.  Repair/Fuel Services. Deploy Bike. Bury Body. Take Clothes. Locate Vehicle. TAB Menu. Custom Traders for 10k / 50k / 100k / 500k humanity Change / Custom door codes. and much more
        Website: Website
      Discord: https://discord.gg/zubtHR9
      Server: overpoch.thewalkingzuk.co.uk
    • By FG_Trap
      Made this in my free time awhile ago thought id make it public.
      Right Alt is the key to open the menu.
      Install instructions are inside the download.
      https://github.com/NWDZ-Trapxxgods/traps-menu
       
       
      here is a picture of the server menu
       
    • By 2DayZ2Retirement
      -PROBLEM SOLVED-
       
      G'day, Survivors.
      I am having an issue on my server where vehicles which spawn randomly around the map repair themselves upon server restart.
      I use this config in my init.sqf which successfully spawns the vehicles in damaged and with low fuel...
      DynamicVehicleDamageLow = 75;
      DynamicVehicleDamageHigh = 100;
      DynamicVehicleFuelLow = 0;
      DynamicVehicleFuelHigh = 25;
      ...However upon each server restart the vehicles repair themselves (the fuel remains low however) and for the life of me I can't figure out why this is happening. 
      DayZ Version -DayZ Epoch 1.0.6.2
      Scripts Used -DZAI | -DZMS | -Right Click Actions (Suicide, Smoke Drugs, GPS Scan)
      AntiHack - InfiSTAR
      Server Host - GTXGaming
      My HiveEXT.log and arma2oaserver.RPT logs are not showing anything out of the ordinary.
      I'm not sure if it matter, but all Planes/Helicopters and Boats have been removed from the server via the dynamic_vehicle.sqf.
      In addition, all of the traders and trader cities being removed by removing the call for the CfgServerTrader.hpp in the description.ext.
      If there is any other info I can show to assist in fixing this problem please let me know, any help would be greatly appreciated.
      Cheers.
    • By rocalpha
      Bonjour, j’écris aujourd’hui parce que j’aimerais savoir si vous ne pourrez pas m'aider. Je loue un serveur via gportal et j’aimerais pouvoir être mon serveur en PvE, mais aussi créer des éléments de base pour la connexion et des choses simples comme . J'ai un autre problème lorsque j'achète une voiture chère à pied cela me met une flèche rouge puis rien non aucun véhicule il apparait qu'après un redémarrage du serveur
    • By Warburgg
      I installed the dynamic climate script and it happens that it rains on the server but only lasts 10 seconds and stops. Is it because I use the script that speeds server time? I currently use Control Time which allows the server to have 2 hours of day and 1 hour night.
      The other climates such as overcast and fog last the forecast time 5-20 minutes but the rain does not.
      In my logs show: 16:52:30 "39:2 Debug: Rain set to 0.92421 for 10.6582 minutes". It rains until it rains but soon stops.
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...