Jump to content

[W.I.P] Working Taser's For OverPoch


Recommended Posts

Hey all,

 

First off I would like to thank PetuniaEpoch for starting this and giving me a clue how to make it work.

 

OK so here we go... First I am going to assume you have a OverPoch Server up and running already and that you have done all the custom variables and compiles etc...

 

First open up your init.sqf and find:

call compile preprocessFileLineNumbers "server_traders.sqf";				//Compile trader configs

Directly underneath it add: (Put the file "fnc_server.sqf" in the .zip into your custom folder)

call compile preprocessFileLineNumbers "custom\fnc_server.sqf";

Then find:

"filmic" setToneMappingParams [0.153, 0.357, 0.231, 0.1573, 0.011, 3.750, 6, 4]; setToneMapping "Filmic";

directly under it add:

[] execVM "\ddopp_taserpack\scripts\init_taser.sqf";
// Set effects control to player
player setVariable ["isTazed", false, true];
player addEventHandler ["HandleDamage",{_this call DDOPP_taser_handleHit}];

Extract from the Epoch dayz_code.pbo the following file: fn_damageHandler.sqf and put it into your "custom" folder and then open it. At the very bottom add:

if ((_this select 4) in DDOPP_taser_arrBullet) then {
	[(_this select 0), (_this select 3), DDOPP_taser_koTime] spawn DDOPP_taser_victimFx;
};
also copy the file: dayz_code\init\zombie_init.sqf and put into your "custom" folder. (Note: this file is also included in the .zip)
 
Open it and make it like so and save and close:
 
private ["_unit","_id"];
_unit = _this select 0;
_id = _unit addeventhandler ["HandleDamage",{_this call local_zombieDamage;_this call DDOPP_taser_handleHit;}];
_id = _unit addeventhandler ["Killed",{[_this,"zombieKills"] call local_eventKill}];

Next onto the compiles.sqf:

 

Add the following line:

	zombie_initialize = 			compile preprocessFileLineNumbers "custom\zombie_init.sqf";

Above:

 

// object_vehicleKilled = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_vehicleKilled.sqf"; //Event handler run on damage
 
Find:
 
fnc_usec_damageHandler =

And change that line to point to your custom file (example below):

	fnc_usec_damageHandler =		compile preprocessFileLineNumbers "custom\fn_damageHandler.sqf";		//Event handler run on damage

Included is a zip file with all the required files incase you cant be bothered to go hunting through the dayz_code.pbo :)

 

tasers.zip  <--- File updated to include the fn_damageHandler.sqf (Sorry missed it when packing it yesterday - my bad)

 

In the zip file you will see a folder named "userconfig" this folder MUST go at the same level as your @DayZ_Epoch / @DayZ_Epoch_Server folders.

See image below for where it is meant to be:

jUVXnlF.png

 

BE FILTER ADDITIONS:

 

Open: publicvariable.txt and at the end of the first line add: (Thanks to Calamity & Marshy)

!"DDOPP_pvSay" !"DDOPP_pvAnim" !"DDOPP_pvSpawn" !"DDOPP_pvChat"

Once again it was PetuniaEpoch that did all the hard work I just sat there for a few hours working out how to finish it off... There are a few bugs one of which doesn't show the "you have been tased" but the effect works and players do get knocked out now - so they kinda work but need a bit of polishing of by someone who is more experienced than I

 

Kind Regards,

 

Pry

Edited by PryMary
Link to comment
Share on other sites

DO we need init_taser.sqf 

[] execVM "\ddopp_taserpack\scripts\init_taser.sqf";

 

if so where do we get it ??

 

yes, yes you do or tasers do not work LMAO!

 

the path is going to: @DayzOverwatch\ddopp_laserpack.pbo\scripts\init_taser.sqf  (that is the full path but Arma just needs what is written to work out where it is.)

 

If you have Overwatch being called in the server initialization (Startup) then you already have it.

 

Hope that clears it up for you :)

 

Pry

Link to comment
Share on other sites

Great Job! 

 

Only problem got it working on players and not zombies?

 

I had not tested it on Zed's yet was focusing on players as peeps want it to shoot players and have an affect on them.. Strange lot but you know how ppl are sometimes! I shall have a look into getting it to knock out / have an affect on Zed's in the near future. I'm currently working on getting Origins buildings to work with P4L atm.

 

Pry

Link to comment
Share on other sites

I had not tested it on Zed's yet was focusing on players as peeps want it to shoot players and have an affect on them.. Strange lot but you know how ppl are sometimes! I shall have a look into getting it to knock out / have an affect on Zed's in the near future. I'm currently working on getting Origins buildings to work with P4L atm.

 

Pry

 

That's ok i just wanted to see if that was intentional not me making a mistake i had a go at getting it working myselfd but with no success

 

Thanks

Link to comment
Share on other sites

ah so you get that too! OK will look into that as well as the zed's.

 

I am no Pro like Raymix or Rimblock so support may / may not be what you expect. I will try my hardest though to help and resolve issues. By all means if you find a fix to a bug please post it as I will be also extremely grateful along with everyone else. Hence why I posted as a WIP as I am sure there will be bugs etc that need to be ironed out so to speak.

 

Thanks for your understanding,

 

Pry

Link to comment
Share on other sites

Running the latest InfiStar BE Filters and i got kicked for a Public Variable

 

#0 "DDOPP_pvSay" = [<NULL-object>,"Taser_Hit"]

I needed to add
 

!"DDOPP_pvSay" !"DDOPP_pvAnim" !"DDOPP_pvSpawn" !"DDOPP_pvChat"

to the first line to stop the kick

Link to comment
Share on other sites

Gonna try this out asap. Been waiting for a working taser script! One question though, you said the zip has all the files needed but I do not see a fn_damageHandler.sqf in the zip. I only see a fnc_server.sqf and zombie_init.sqf

 

I edited my files manually, was just wondering where fn_damageHandler.sqf is and why there is a fnc_server.sqf when there is no mention of it in your post.

 

Also, a little confused about this:

In the zip file you will see a folder named "userconfig" this folder MUST go at the same level as your @DayZ_Epoch / @DayZ_Epoch_Server folders.

 

Does this go into the ftp or in the root of the mission pbo? IE in the same folder that the init.sqf, description.ext and mission.sqm

Link to comment
Share on other sites

Running the latest InfiStar BE Filters and i got kicked for a Public Variable

 

#0 "DDOPP_pvSay" = [<NULL-object>,"Taser_Hit"]

I needed to add

 

!"DDOPP_pvSay" !"DDOPP_pvAnim" !"DDOPP_pvSpawn" !"DDOPP_pvChat"

to the first line to stop the kick

Does this go into the scripts.txt file or in AHconfig?

Link to comment
Share on other sites

Running the latest InfiStar BE Filters and i got kicked for a Public Variable

 

#0 "DDOPP_pvSay" = [<NULL-object>,"Taser_Hit"]

I needed to add

 

!"DDOPP_pvSay" !"DDOPP_pvAnim" !"DDOPP_pvSpawn" !"DDOPP_pvChat"

to the first line to stop the kick

 

 

Does this go into the scripts.txt file or in AHconfig?

 

It goes in publicvariable.txt

Link to comment
Share on other sites

I know this says a work in progress but my god... Please make it clear what files need editing on the server and what mission files need editing. From trying to read the OP I am assuming EVERYTHING is done mission side except for the userconfig folder... am I wrong? Also the .zip file you attached just has the little snippets in them, not the entire script with the snippets appended.

 

I have a vilayer server so maybe it is just me that is getting confused.

Link to comment
Share on other sites

It goes in publicvariable.txt

 

Got it thanks a lot orion!

 

I know this says a work in progress but my god... Please make it clear what files need editing on the server and what mission files need editing. From trying to read the OP I am assuming EVERYTHING is done mission side except for the userconfig folder... am I wrong? Also the .zip file you attached just has the little snippets in them, not the entire script with the snippets appended.

 

I have a vilayer server so maybe it is just me that is getting confused.

 

Not 100% sure tbh, I put userconfig into the ftp and in mission.pbo and it works, not sure which one it is supposed to be in though.

Do all the additions to the files OP said and put fnc_server into your custom folder and it should work.

 

Also, appears to ONLY work on players. Does not work on AI. Hopefully that can be changed so you can knock them out and take their weapons from them :) If you can get close enough to knock them out, you deserve the stinger or rpg that normally despawns when the ai dies !!

Link to comment
Share on other sites

Got it thanks a lot orion!

 

 

Not 100% sure tbh, I put userconfig into the ftp and in mission.pbo and it works, not sure which one it is supposed to be in though.

Do all the additions to the files OP said and put fnc_server into your custom folder and it should work.

 

Also, appears to ONLY work on players. Does not work on AI. Hopefully that can be changed so you can knock them out and take their weapons from them :) If you can get close enough to knock them out, you deserve the stinger or rpg that normally despawns when the ai dies !!

 

Just use player arrest and detain, like a real man should ;)

Link to comment
Share on other sites

insert could you post an install guide for detain arrest had a look at the one in opendayz but it is alot of different directions spread across 20+ posts

 

fn_selfactions

  } else {
      player removeAction s_player_maintain_area;
      s_player_maintain_area = -1;
      player removeAction s_player_maintain_area_preview;
      s_player_maintain_area_preview = -1;
  };
 //--------------------------------------ARREST----------------------------------------------------------------
    if ((player getVariable"humanity") >= 1 or (player getVariable"humanity") <= -1) then { // change humanity to your own needs
 if(_isMan && !_isZombie && _canDo && _isAlive) then {
            if (s_player_arrest < 0) then {
                s_player_arrest = player addaction ['<t color="#0074E8">' + "Investigation Menu" + '</t>', "Scripts\Investigation\investigation.sqf","",100,false,true,"", ""];
                };
        } else {
            player removeAction s_player_arrest;
            s_player_arrest = -1;
     };
  };
 //-------------------------------------------------------------------------------------------------------------
 // CURSOR TARGET ALIVE
 if(_isAlive) then {
 

 

add the exceptions to your BE filters

 

publicvariable (I think)

 

!="Detain" !="PVDZ_ply_Arrst"

add to the end of the first line.

 

 

after this, download the files (cant find the link right now) and place in your mission file

Link to comment
Share on other sites

Gonna try this out asap. Been waiting for a working taser script! One question though, you said the zip has all the files needed but I do not see a fn_damageHandler.sqf in the zip. I only see a fnc_server.sqf and zombie_init.sqf

 

I edited my files manually, was just wondering where fn_damageHandler.sqf is and why there is a fnc_server.sqf when there is no mention of it in your post.

 

Also, a little confused about this:

In the zip file you will see a folder named "userconfig" this folder MUST go at the same level as your @DayZ_Epoch / @DayZ_Epoch_Server folders.

 

Does this go into the ftp or in the root of the mission pbo? IE in the same folder that the init.sqf, description.ext and mission.sqm

 

To answer in order of questions:

 

If you had read the OP properly you would have read that you have to extract the fn_damageHandler.sqf & zombie_init.sqf from the dayz_code.pbo

 

The folder userconfig must be at the same level of hierarchy as @DayzOverwatch / @DayZ_Epoch etc..

 

See picture below:

 

jUVXnlF.png

 

Regarding fnc_server.sqf in the OP I stated:

Directly underneath it add:

call compile preprocessFileLineNumbers "custom\fnc_server.sqf";     <------- Location of where to put the file: in the custom folder like everything else ;-)

 

Hope this clears up things.

Link to comment
Share on other sites

fn_selfactions

  } else {
      player removeAction s_player_maintain_area;
      s_player_maintain_area = -1;
      player removeAction s_player_maintain_area_preview;
      s_player_maintain_area_preview = -1;
  };
 //--------------------------------------ARREST----------------------------------------------------------------
    if ((player getVariable"humanity") >= 1 or (player getVariable"humanity") <= -1) then { // change humanity to your own needs
 if(_isMan && !_isZombie && _canDo && _isAlive) then {
            if (s_player_arrest < 0) then {
                s_player_arrest = player addaction ['<t color="#0074E8">' + "Investigation Menu" + '</t>', "Scripts\Investigation\investigation.sqf","",100,false,true,"", ""];
                };
        } else {
            player removeAction s_player_arrest;
            s_player_arrest = -1;
     };
  };
 //-------------------------------------------------------------------------------------------------------------
 // CURSOR TARGET ALIVE
 if(_isAlive) then {
 

add the exceptions to your BE filters

 

publicvariable (I think)

 

!="Detain" !="PVDZ_ply_Arrst"

add to the end of the first line.

 

 

after this, download the files (cant find the link right now) and place in your mission file

came across these in my travels all those add actions in the fn selfactions would go into infistar right? one file in there i cant find a path for too tired need sleep  https://www.dropbox.com/s/5tq2hgogg8z0gdb/arrest.rar

Link to comment
Share on other sites

I know this says a work in progress but my god... Please make it clear what files need editing on the server and what mission files need editing. From trying to read the OP I am assuming EVERYTHING is done mission side except for the userconfig folder... am I wrong? Also the .zip file you attached just has the little snippets in them, not the entire script with the snippets appended.

 

I have a vilayer server so maybe it is just me that is getting confused.

 

there was no mention of any dayz_server.pbo edits required it is all Mission.pbo related. The only exception is the userconfig folder that goes into your server "root"

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
×
×
  • Create New...