Jump to content

***[Knock/Abuse/StoleBlood/]***


Recommended Posts

With this players can knock out others, and stole blood, and abuse.

BASED IN KNOCK OUT SYSTEM OF PLAYER2 original :

http://opendayz.net/threads/release-player2s-knockout.12533/

*Install:

u will need a custom fn_selfActions.sqf . compiles.sqf , variables.sqf , PublicEh.sqf

1-making this custom sqf.

paste fn_selfActions.sqf . compiles.sqf , variables.sqf , PublicEh.sqf  in MPmissions\yourInstance\custom\

Now go to your init.sqf and change your lines by this lines in blue. (if u already have all this customs or just a few.. just add all you dont have.)

  Reveal hidden contents

2-Go to your custom fn_SelfActions.sqf

find:

	player removeAction s_player_studybody;
	s_player_studybody = -1;

and add below

player removeAction s_player_knockout;
    s_player_knockout = -1;
	player removeAction s_player_force;
    s_player_force = -1;
	player removeAction s_player_sblood;
    s_player_sblood = -1;

Find:

//Dog
		if (_isDog && _isAlive && (_hasRawMeat) && _ownerID == "0" && player getVariable ["dogID", 0] == 0) then {
			if (s_player_tamedog < 0) then {
				s_player_tamedog = player addAction [localize "str_actions_tamedog", "\z\addons\dayz_code\actions\tame_dog.sqf", _cursorTarget, 1, false, true, "", ""];
			};
		} else {
			player removeAction s_player_tamedog;
			s_player_tamedog = -1;
		};

add below

 //####    KNOCKOUT            ####
    _unconscious =    cursorTarget getVariable ["NORRN_unconscious", false];
 
    if (_isMan and _isAlive and !_isZombie and _canDo and !_unconscious) then {
        if (s_player_knockout < 0) then {
            s_player_knockout = player addAction [("<t color=""#FF9800"">" + ("Knockout!") + "</t>"), "fixes\knockout.sqf",cursorTarget, 0, false, true, "",""];
        };
    } else {
        player removeAction s_player_knockout;
        s_player_knockout = -1;
    };
    //##############################
	//********abuse/stole blood
	if (_isMan and _isAlive and !_isZombie and !_isAnimal and _unconscious  and _canDo and (player distance cursorTarget < 3)) then {
	if (s_player_force < 0) then {
            s_player_force = player addAction [("<t color=""#FF9800"">" + ("Abuse") + "</t>"), "fixes\forced.sqf",cursorTarget, 0, false, true, "",""];
        };
		if (s_player_sblood < 0) then {
            s_player_sblood = player addAction [("<t color=""#FF9800"">" + ("StoleBlood") + "</t>"), "fixes\sblood.sqf",cursorTarget, 0, false, true, "",""];
        };
		
    } else {
        player removeAction s_player_force;
        s_player_force = -1;
		player removeAction s_player_sblood;
        s_player_sblood = -1;			
	};
	//********end of abuse/stole

3-Now go to custom compiles.sqf

find:

player_sleep = 				compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_sleep.sqf";

add below:

player_knockout =           compile preprocessFileLineNumbers "fixes\knockout2.sqf";
player_sblood2 =           compile preprocessFileLineNumbers "fixes\sblood2.sqf";
player_force2 =            compile preprocessFileLineNumbers "fixes\forced2.sqf";

4- in custom variables.sqf

find:

canRoll = true;

place above:

dayz_knockout = [];
dayz_sblood2 =[];
dayz_force2 =[];

5-in custom PublicEH.sqf

find:

"PVDZE_obj_Fire"		addPublicVariableEventHandler {nulexp=(_this select 1) spawn BIS_Effects_Burn};

place below:

"dayz_knockout"         addPublicVariableEventHandler {nul=(_this select 1) call player_knockout};
"dayz_sblood2"           addPublicVariableEventHandler {nul=(_this select 1) call player_sblood2};
"dayz_force2"           addPublicVariableEventHandler {nul=(_this select 1) call player_force2};

6-Now, in MPMissions\yourinstance\ create a folder called "fixes". Then create and drop into all this .sqf

knockout.sqf

  Reveal hidden contents

knockout2.sqf

  Reveal hidden contents

forced.sqf

  Reveal hidden contents

forced2.sqf

  Reveal hidden contents

sblood.sqf

  Reveal hidden contents

sblood2.sqf

  Reveal hidden contents

 

Link to comment
Share on other sites

  • 2 weeks later...
  On 6/21/2016 at 6:48 PM, juandayz said:

With this players can knock out others, and stole blood, and abuse.

BASED IN KNOCK OUT SYSTEM OF PLAYER2 original :

http://opendayz.net/threads/release-player2s-knockout.12533/

*Install:

u will need a custom fn_selfActions.sqf . compiles.sqf , variables.sqf , PublicEh.sqf

1-making this custom sqf.

paste fn_selfActions.sqf . compiles.sqf , variables.sqf , PublicEh.sqf  in MPmissions\yourInstance\custom\

Now go to your init.sqf and change your lines by this lines in blue. (if u already have all this customs or just a few.. just add all you dont have.)

  Reveal hidden contents

2-Go to your custom fn_SelfActions.sqf

find:

	player removeAction s_player_studybody;
	s_player_studybody = -1;

and add below

player removeAction s_player_knockout;
    s_player_knockout = -1;
	player removeAction s_player_force;
    s_player_force = -1;
	player removeAction s_player_sblood;
    s_player_sblood = -1;

Find:

//Dog
		if (_isDog && _isAlive && (_hasRawMeat) && _ownerID == "0" && player getVariable ["dogID", 0] == 0) then {
			if (s_player_tamedog < 0) then {
				s_player_tamedog = player addAction [localize "str_actions_tamedog", "\z\addons\dayz_code\actions\tame_dog.sqf", _cursorTarget, 1, false, true, "", ""];
			};
		} else {
			player removeAction s_player_tamedog;
			s_player_tamedog = -1;
		};

add below

 //####    KNOCKOUT            ####
    _unconscious =    cursorTarget getVariable ["NORRN_unconscious", false];
 
    if (_isMan and _isAlive and !_isZombie and _canDo and !_unconscious) then {
        if (s_player_knockout < 0) then {
            s_player_knockout = player addAction [("<t color=""#FF9800"">" + ("Knockout!") + "</t>"), "fixes\knockout.sqf",cursorTarget, 0, false, true, "",""];
        };
    } else {
        player removeAction s_player_knockout;
        s_player_knockout = -1;
    };
    //##############################
	//********abuse/stole blood
	if (_isMan and _isAlive and !_isZombie and !_isAnimal and _unconscious  and _canDo and (player distance cursorTarget < 3)) then {
	if (s_player_force < 0) then {
            s_player_force = player addAction [("<t color=""#FF9800"">" + ("Abuse") + "</t>"), "fixes\forced.sqf",cursorTarget, 0, false, true, "",""];
        };
		if (s_player_sblood < 0) then {
            s_player_sblood = player addAction [("<t color=""#FF9800"">" + ("StoleBlood") + "</t>"), "fixes\sblood.sqf",cursorTarget, 0, false, true, "",""];
        };
		
    } else {
        player removeAction s_player_force;
        s_player_force = -1;
		player removeAction s_player_sblood;
        s_player_sblood = -1;			
	};
	//********end of abuse/stole

3-Now go to custom compiles.sqf

find:

player_sleep = 				compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_sleep.sqf";

add below:

player_knockout =           compile preprocessFileLineNumbers "fixes\knockout2.sqf";
player_sblood2 =           compile preprocessFileLineNumbers "fixes\sblood2.sqf";
player_force2 =            compile preprocessFileLineNumbers "fixes\forced2.sqf";

4- in custom variables.sqf

find:

canRoll = true;

place above:

dayz_knockout = [];
dayz_sblood2 =[];
dayz_force2 =[];

5-in custom PublicEH.sqf

find:

"PVDZE_obj_Fire"		addPublicVariableEventHandler {nulexp=(_this select 1) spawn BIS_Effects_Burn};

place below:

"dayz_knockout"         addPublicVariableEventHandler {nul=(_this select 1) call player_knockout};
"dayz_sblood2"           addPublicVariableEventHandler {nul=(_this select 1) call player_sblood2};
"dayz_force2"           addPublicVariableEventHandler {nul=(_this select 1) call player_force2};

6-Now, in MPMissions\yourinstance\ create a folder called "fixes". Then create and drop into all this .sqf

knockout.sqf

  Reveal hidden contents

knockout2.sqf

  Reveal hidden contents

forced.sqf

  Reveal hidden contents

forced2.sqf

  Reveal hidden contents

sblood.sqf

  Reveal hidden contents

sblood2.sqf

  Reveal hidden contents

 

Expand  

In safe zone can do it?

Link to comment
Share on other sites

  • 4 weeks later...
  On 7/30/2016 at 8:00 PM, J.Dominic said:

Do you already test? Player can Knock/Abuse/StoleBlood in safe zone area?

Expand  

only test it with traders bot, action is allowed but you cant nockout bots in safezones.  i guess is the same for players...

any way into knockoout.sqf thers an option to requiere crowbar to nock you can enamble this options.. cuz melee tools its not allowed in safezones

_knockoutMode

or make a restriction at bottom of fn_selfactions

something like this

  Reveal hidden contents

 

Link to comment
Share on other sites

  On 7/31/2016 at 5:25 PM, Cherdenko said:

maybe you could do sth about the canbuild feature in safezones...

so im not that good with scripting, but can you imagine sth like

if Canbuild true

exit with {}

maybe that will do the job for the safezones

Expand  

nice idea cherdenko!

other thing can be add a restriction in fn_Selfactions.sqf

in this part:

find:

  Reveal hidden contents

change by:

  Reveal hidden contents

 

Link to comment
Share on other sites

  • 7 months later...

Error in expression <eAction s_player_tu;
s_player_tu = -1;
};


private ["_unconscious"];
_unconscio>
  Error position: <;


private ["_unconscious"];
_unconscio>
  Error Missing )
File mpmissions\__CUR_MP.Chernarus\dayz_code\compile\fn_selfActions.sqf, line 826

 

@juandayz getting this error trying to test tie up player on 1061

 

Link to comment
Share on other sites

  On 3/31/2017 at 6:30 AM, Hooty said:

Error in expression <eAction s_player_tu;
s_player_tu = -1;
};


private ["_unconscious"];
_unconscio>
  Error position: <;


private ["_unconscious"];
_unconscio>
  Error Missing )
File mpmissions\__CUR_MP.Chernarus\dayz_code\compile\fn_selfActions.sqf, line 826

 

@juandayz getting this error trying to test tie up player on 1061

 

Expand  

add the s_player_tu = -1; in a custom variables.sqf

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Discord

×
×
  • Create New...