Jump to content
Sign in to follow this  
juandayz

***[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.)

Spoiler

//Load in compiled functions
call compile preprocessFileLineNumbers "custom\variables.sqf";                //Initilize the Variables (IMPORTANT: Must happen very early)
progressLoadingScreen 0.1;
call compile preprocessFileLineNumbers "custom\publicEH.sqf";                //Initilize the publicVariable event handlers
progressLoadingScreen 0.2;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\setup_functions_med.sqf";    //Functions used by CLIENT for medical
progressLoadingScreen 0.4;
call compile preprocessFileLineNumbers "custom\compiles.sqf";    // Custom Compile
/*ZSC*/    
call compile preprocessFileLineNumbers "ZSC\gold\ZSCinit.sqf";
/*ZSC*/            
progressLoadingScreen 0.5;
call compile preprocessFileLineNumbers "server_traders_cherno_11.sqf";                //Compile trader configs
progressLoadingScreen 1.0;

fnc_usec_selfActions = compile preprocessFileLineNumbers "custom\fn_selfActions.sqf";  // IF ure calling fn_selfaction from custom compiles.sqf Dont add this line or delete the call from compiles.sqf

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

Spoiler

private["_hasCrowbar1","_item","_text","_body","_name","_hasCrowbar2","_knockoutMode"];
_body =    _this select 3;
_onLadder =        (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
 
if (_onLadder) exitWith {cutText ["You can't knock a player out while you're on a ladder; don't you know anything?" , "PLAIN DOWN"]};
 
//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
// Knockout Configuration \\\\\\\\\\\\\\\\\\\\\\\\\
///////////////////////////////////////////////////
//==============================================//
// Knockout Gear Requirements
//--------------------------------------------//
// 2: Weapon (Primary or Secondary) Required
// 1: Crowbar Required
// 0: Nothing Required
//---------------------------------------//
_knockoutMode = 2;
//=====================================//
// Credits
//-----------------------------------//
// Script by Player2
// Thanks To:
// DayZRedux, OpenDayZ
// GhostZ, Gorsy
//==============================//
// www.ZombZ.net
//============================//
 
_hasCrowbar1 = "MeleeCrowbar" in weapons player;
_hasCrowbar2 = "ItemCrowbar" in items player;
_hasPrimary = 0;
 
if (PrimaryWeapon player != "") then {
    _hasPrimary = 1;
} else {
    _hasPrimary = 0;
};
 
 
if (_knockoutMode == 0) then {
    dayz_knockout = [_body,3.5];
    publicVariable "dayz_knockout";
    player playActionNow "PutDown";
    sleep 1;
};
 
if (_knockoutMode == 1) then {
    if (_hasCrowbar1) then {
        dayz_knockout = [_body,3.5];
        publicVariable "dayz_knockout";
        player playActionNow "PutDown";
        sleep 1;
    };
 
    if (_hasCrowbar2) then {
        dayz_knockout = [_body,3.5];
        publicVariable "dayz_knockout";
        player playActionNow "PutDown";
        sleep 1;
    };
 
    if (!_hasCrowbar1 and !_hasCrowbar2) exitWith
    {
        cutText ["You need a Crowbar for this!" , "PLAIN DOWN"];
    };
};
 
if (_knockoutMode == 2) then {
    if (_hasPrimary == 1) then {
        dayz_knockout = [_body,3.5];
        publicVariable "dayz_knockout";
        player playActionNow "PutDown";
        sleep 1;
    } else {
        cutText ["You need a Weapon for this!" , "PLAIN DOWN"];
    };
};

knockout2.sqf

Spoiler

private["_body","_duration"];
_body = _this select 0;
_duration = _this select 1;
 
diag_log("Knockout attempt on:" + str(_body) + " and I am: " + str(player) );
 
if (_body == player) then {
    diag_log("Knocked out!");
    [player, _duration] call fnc_usec_damageUnconscious;
    cutText ["You've been knocked out! This is not good!", "PLAIN DOWN"];
};

forced.sqf

Spoiler

private ["_body","_isBandit","_isHero","_infectrand","_welcomeMessage","_camDistance"];
_body = _this select 3;
_isBandit = (cursortarget getVariable["humanity",0]) <= -2500;
_isHero = (cursortarget getVariable["humanity",0]) >= 5000;
_infectrand = round(random 10);    
_welcomeMessage = format["You suck Dont do it in real life!, %1,",format["%1", name player]];
_camDistance = 60;

dayz_force2 = [_body,3.5];
publicVariable "dayz_force2";
 showCinemaBorder true;
   camUseNVG false;               
   _camera = "camera" camCreate [(position player select 0)-2, position player select 1,(position player select 2)+_camDistance];
   _camera cameraEffect ["internal","back"];
   
   _camera camSetFOV 2.000;
   _camera camCommit 0;
   waitUntil {camCommitted _camera};
   playSound "heartbeat_1";
 
   _camera camSetTarget vehicle player;
   _camera camSetRelPos [0,0,2];
   _camera camCommit 8;
 
   cutText [_welcomeMessage, "PLAIN DOWN"];

   waitUntil {camCommitted _camera};
 
  _camera cameraEffect ["terminate","back"];
  camDestroy _camera;  

    if (_isBandit) then {
        [player,-250] call player_humanityChange;
        cutText [", -250 humanity.", "PLAIN DOWN"];
    if (_infectrand < 4) then {r_player_infected = true;
        cutText [format["%1, you get infected by some kind of virus",name player], "PLAIN DOWN"];
    };
    };
    if (!_isHero and !_isBandit) then {
        [player,-500] call player_humanityChange;
        cutText [", -500 humanity.", "PLAIN DOWN"];
    if (_infectrand < 4) then {r_player_infected = true;
        cutText [format["%1, you get infected by some kind of virus",name player], "PLAIN DOWN"];
    };    
    };
    if (_isHero) then {
        [player,-1000] call player_humanityChange;
        cutText [", -1000 humanity.", "PLAIN DOWN"];
    if (_infectrand < 4) then {r_player_infected = true;
        cutText [format["%1, you get infected by some kind of virus",name player], "PLAIN DOWN"];
    };    
};   

forced2.sqf

Spoiler

private["_body"];
_body = _this select 0;

diag_log("force2 attempt on:" + str(_body) + " and I am: " + str(player) );

if (_body == player) then {
diag_log("Youre been forced to have sex");
[player,-100] call player_humanityChange;
r_player_infected = true;
r_player_inpain = true;
player setVariable["USEC_inPain",true,true];
cutText ["youre been forced to have sex", "PLAIN DOWN"];
};

 

sblood.sqf

Spoiler


private ["_body","_LastUsedTime","_Time"];
_body = _this select 3;
_LastUsedTime = 160;
_Time = time - lastuse;

if(_Time < _LastUsedTime) exitWith {
    cutText [format["espera %1 segundos !",(round(_Time - _LastUsedTime))], "PLAIN DOWN"];
};
    
lastuse = time;
dayz_sblood2 = [_body,3.5];
publicVariable "dayz_sblood2";
player playActionNow "Medic";
    sleep 2;
    player addMagazine "ItemBloodbag";
    [player,-100] call player_humanityChange;
    sleep 3;
    cutText ["Robaste la Sangre de este survivor", "PLAIN DOWN"];

sblood2.sqf

Spoiler

private["_body"];
_body = _this select 0;

diag_log("sblood2 attempt on:" + str(_body) + " and I am: " + str(player) );
 
if (_body == player) then {
    diag_log("Sotle Blood");
    r_player_blood = r_player_blood - 1000;
    r_player_injured = true;
    publicVariable "PVDZE_hlt_Bleed";
    r_player_inpain = true;
    //player setVariable["USEC_injured",true]; // bleeding  
    cutText ["Someone stole your blood! This is not good!", "PLAIN DOWN"];
};

 

 

Share this post


Link to post
Share on other sites
On 22/6/2559 at 1:48 AM, 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

//Load in compiled functions
call compile preprocessFileLineNumbers "custom\variables.sqf";                //Initilize the Variables (IMPORTANT: Must happen very early)
progressLoadingScreen 0.1;
call compile preprocessFileLineNumbers "custom\publicEH.sqf";                //Initilize the publicVariable event handlers
progressLoadingScreen 0.2;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\setup_functions_med.sqf";    //Functions used by CLIENT for medical
progressLoadingScreen 0.4;
call compile preprocessFileLineNumbers "custom\compiles.sqf";    // Custom Compile
/*ZSC*/    
call compile preprocessFileLineNumbers "ZSC\gold\ZSCinit.sqf";
/*ZSC*/            
progressLoadingScreen 0.5;
call compile preprocessFileLineNumbers "server_traders_cherno_11.sqf";                //Compile trader configs
progressLoadingScreen 1.0;

fnc_usec_selfActions = compile preprocessFileLineNumbers "custom\fn_selfActions.sqf";  // IF ure calling fn_selfaction from custom compiles.sqf Dont add this line or delete the call from compiles.sqf

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

private["_hasCrowbar1","_item","_text","_body","_name","_hasCrowbar2","_knockoutMode"];
_body =    _this select 3;
_onLadder =        (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
 
if (_onLadder) exitWith {cutText ["You can't knock a player out while you're on a ladder; don't you know anything?" , "PLAIN DOWN"]};
 
//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
// Knockout Configuration \\\\\\\\\\\\\\\\\\\\\\\\\
///////////////////////////////////////////////////
//==============================================//
// Knockout Gear Requirements
//--------------------------------------------//
// 2: Weapon (Primary or Secondary) Required
// 1: Crowbar Required
// 0: Nothing Required
//---------------------------------------//
_knockoutMode = 2;
//=====================================//
// Credits
//-----------------------------------//
// Script by Player2
// Thanks To:
// DayZRedux, OpenDayZ
// GhostZ, Gorsy
//==============================//
// www.ZombZ.net
//============================//
 
_hasCrowbar1 = "MeleeCrowbar" in weapons player;
_hasCrowbar2 = "ItemCrowbar" in items player;
_hasPrimary = 0;
 
if (PrimaryWeapon player != "") then {
    _hasPrimary = 1;
} else {
    _hasPrimary = 0;
};
 
 
if (_knockoutMode == 0) then {
    dayz_knockout = [_body,3.5];
    publicVariable "dayz_knockout";
    player playActionNow "PutDown";
    sleep 1;
};
 
if (_knockoutMode == 1) then {
    if (_hasCrowbar1) then {
        dayz_knockout = [_body,3.5];
        publicVariable "dayz_knockout";
        player playActionNow "PutDown";
        sleep 1;
    };
 
    if (_hasCrowbar2) then {
        dayz_knockout = [_body,3.5];
        publicVariable "dayz_knockout";
        player playActionNow "PutDown";
        sleep 1;
    };
 
    if (!_hasCrowbar1 and !_hasCrowbar2) exitWith
    {
        cutText ["You need a Crowbar for this!" , "PLAIN DOWN"];
    };
};
 
if (_knockoutMode == 2) then {
    if (_hasPrimary == 1) then {
        dayz_knockout = [_body,3.5];
        publicVariable "dayz_knockout";
        player playActionNow "PutDown";
        sleep 1;
    } else {
        cutText ["You need a Weapon for this!" , "PLAIN DOWN"];
    };
};

knockout2.sqf

  Reveal hidden contents

private["_body","_duration"];
_body = _this select 0;
_duration = _this select 1;
 
diag_log("Knockout attempt on:" + str(_body) + " and I am: " + str(player) );
 
if (_body == player) then {
    diag_log("Knocked out!");
    [player, _duration] call fnc_usec_damageUnconscious;
    cutText ["You've been knocked out! This is not good!", "PLAIN DOWN"];
};

forced.sqf

  Reveal hidden contents

private ["_body","_isBandit","_isHero","_infectrand","_welcomeMessage","_camDistance"];
_body = _this select 3;
_isBandit = (cursortarget getVariable["humanity",0]) <= -2500;
_isHero = (cursortarget getVariable["humanity",0]) >= 5000;
_infectrand = round(random 10);    
_welcomeMessage = format["You suck Dont do it in real life!, %1,",format["%1", name player]];
_camDistance = 60;

dayz_force2 = [_body,3.5];
publicVariable "dayz_force2";
 showCinemaBorder true;
   camUseNVG false;               
   _camera = "camera" camCreate [(position player select 0)-2, position player select 1,(position player select 2)+_camDistance];
   _camera cameraEffect ["internal","back"];
   
   _camera camSetFOV 2.000;
   _camera camCommit 0;
   waitUntil {camCommitted _camera};
   playSound "heartbeat_1";
 
   _camera camSetTarget vehicle player;
   _camera camSetRelPos [0,0,2];
   _camera camCommit 8;
 
   cutText [_welcomeMessage, "PLAIN DOWN"];

   waitUntil {camCommitted _camera};
 
  _camera cameraEffect ["terminate","back"];
  camDestroy _camera;  

    if (_isBandit) then {
        [player,-250] call player_humanityChange;
        cutText [", -250 humanity.", "PLAIN DOWN"];
    if (_infectrand < 4) then {r_player_infected = true;
        cutText [format["%1, you get infected by some kind of virus",name player], "PLAIN DOWN"];
    };
    };
    if (!_isHero and !_isBandit) then {
        [player,-500] call player_humanityChange;
        cutText [", -500 humanity.", "PLAIN DOWN"];
    if (_infectrand < 4) then {r_player_infected = true;
        cutText [format["%1, you get infected by some kind of virus",name player], "PLAIN DOWN"];
    };    
    };
    if (_isHero) then {
        [player,-1000] call player_humanityChange;
        cutText [", -1000 humanity.", "PLAIN DOWN"];
    if (_infectrand < 4) then {r_player_infected = true;
        cutText [format["%1, you get infected by some kind of virus",name player], "PLAIN DOWN"];
    };    
};   

forced2.sqf

  Reveal hidden contents

private["_body"];
_body = _this select 0;

diag_log("force2 attempt on:" + str(_body) + " and I am: " + str(player) );

if (_body == player) then {
diag_log("Youre been forced to have sex");
[player,-100] call player_humanityChange;
r_player_infected = true;
r_player_inpain = true;
player setVariable["USEC_inPain",true,true];
cutText ["youre been forced to have sex", "PLAIN DOWN"];
};

 

sblood.sqf

  Reveal hidden contents


private ["_body","_LastUsedTime","_Time"];
_body = _this select 3;
_LastUsedTime = 160;
_Time = time - lastuse;

if(_Time < _LastUsedTime) exitWith {
    cutText [format["espera %1 segundos !",(round(_Time - _LastUsedTime))], "PLAIN DOWN"];
};
    
lastuse = time;
dayz_sblood2 = [_body,3.5];
publicVariable "dayz_sblood2";
player playActionNow "Medic";
    sleep 2;
    player addMagazine "ItemBloodbag";
    [player,-100] call player_humanityChange;
    sleep 3;
    cutText ["Robaste la Sangre de este survivor", "PLAIN DOWN"];

sblood2.sqf

  Reveal hidden contents

private["_body"];
_body = _this select 0;

diag_log("sblood2 attempt on:" + str(_body) + " and I am: " + str(player) );
 
if (_body == player) then {
    diag_log("Sotle Blood");
    r_player_blood = r_player_blood - 1000;
    r_player_injured = true;
    publicVariable "PVDZE_hlt_Bleed";
    r_player_inpain = true;
    //player setVariable["USEC_injured",true]; // bleeding  
    cutText ["Someone stole your blood! This is not good!", "PLAIN DOWN"];
};

 

 

In safe zone can do it?

Share this post


Link to post
Share on other sites
On 4/7/2559 at 1:06 AM, juandayz said:

sory, i no test it in safe zones, but u cant knok AI trader..  let me test with players and i send a msg to say u what happend.

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

Share this post


Link to post
Share on other sites
15 minutes ago, J.Dominic said:

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

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

Spoiler

//restrict knock in safezones
private ["_blockedareas","_playerPos","_nearrestriction"];

_blockedareas =
[[1167.69,2516.06,0.0014472],[6352.43,7789.2,0.00140381],[1767.52,7797.28,0.00161743]];//put coords from traders

_playerPos = getPosATL player;
_nearrestriction = count nearestObjects [_playerPos, _blockedareas, 150] > 0;
 
if (_nearrestriction) then {     
        player removeAction s_player_knockout;
        s_player_knockout = -1;
    };             

 

 

Share this post


Link to post
Share on other sites
53 minutes ago, 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

nice idea cherdenko!

other thing can be add a restriction in fn_Selfactions.sqf

in this part:

find:

Spoiler

    _unconscious =    cursorTarget getVariable ["NORRN_unconscious", false];
 
    if (_isMan and _isAlive and !_isZombie and _canDo and !_unconscious and !_NotAllowedArea) 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

change by:

Spoiler

//####    KNOCKOUT            ####
private ["_safezones","_pos","_allconditions","_NotAllowedArea];

_safezones =
[
    [[6325.6772,7807.7412,0],150,true],
    [[4063.4226,11664.19,0],150,true],
    [[11447.472,11364.504,0],150,true],
    [[1606.6443,7803.5156,0],150,true],
    [[12944.227,12766.889,0],150,true],
    [[5068.6636,9723.4248,0],100,true],
    [[12060,12640,0],200,true]
];


    _pos = getPosATL player;
    _allconditions = (nearestObjects [_pos, _safezones, 100]);
    _NotAllowedArea = count _allconditions > 0;

    

    _unconscious =    cursorTarget getVariable ["NORRN_unconscious", false];
 
    if (_isMan and _isAlive and !_isZombie and _canDo and !_unconscious and !_NotAllowedArea) 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

 

Share this post


Link to post
Share on other sites

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

 

Share this post


Link to post
Share on other sites
On 31/3/2017 at 3: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

 

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

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 Tricks
      We are back! Ranked 7th overall in 2014! Classic DayZ Epoch PvP Server!! No stupid start bonus, no heavy military. Just classic Epoch gameplay with new updates!

       
      - Top of the Line Hardware - Overclocked 8700k servers with SSDs. Super high FPS!!

      - XP System & XP Trader - Acquire handy Perks, Skills, and Permits with our XP system!

      - Custom Traders - Totally custom traders unique to this server!

      - Military Bases - High Loot areas perfect for gearing up.

      - Custom Map Content - Aircraft Carriers, Secret Military Bases, New Towns, and more!

      - All The Major Mods - All the major mods like Coin System, Heli Evac, Hide from Zeds, and many more.

      - Lots of AI Missions - Challenging AI missions color-coded by difficulty.

      - Custom AI Missions for Groups - Static missions with super high difficulty and major loot rewards!

      - Realistic Loot Spawns - You wont find high-powered weapons while hunting for loot, realistic loot spawns.

      - No Heavy Weapons, Tanks, Attack Choppers, Jets - Just the classic Epoch vehicles with a few new additions!

      - Lots of Vehicles - Lots of vehicles scattered around the map. Some are ready to go, others need to be fixed first!

      - Base Building - Fully modular base building system with unique build items and crafting recipes.

      - Full Day/Night Cycle - Realistic day and night cycle, no stupid 24 hours daylight!!

      - Full Weather System - Rain, thunderstorms and snow in the winter!!

      - Destructible Base/Garage Doors - Base raiding without losing your whole base! Just the doors are destructible.

      - Abandoned Safes/Lockboxes - Abandoned bases will have their safes unlocked for you to raid!!

      - Fresh Server, All The Best Base Locations Still Available! - No more wipes, server is done and all progress will be saved.

      - Regular Updates/Suggestions Considered - Pass along ideas to the admin staff. We consider all changes.

      - Admin Events - Events with High Loot and great times! See pic below.

      - Active Admin Staff - Find us on Discord anytime or by email!





      Connect to us on DayZ Launcher or directly:

      [SHG]ClassicEpoch|XPSystem|CustomTraders|CustomAImissions|Coins|FPS++

      144.217.62.76:2302

      Discord: http://xn--discrd-zxa.com/join.php?v=OXHD95

      Email: [email protected]

      Website: Under construction


    • By Bloodthirsty
      Hey I just need some files for this server, any and all you guys can come up with and think it deserve post that shit in chat rn. I want to see some crazy ideas and additions if you got em :) Lets see what you guys can come up with

    • By Tricks
      I have been browsing the forums looking for unique mods to add to my server. I noticed Juandayz deleted a lot of his mods before leaving the community. Just curious if anyone has them all and would possibly repost them giving him full credit? I am particularly interested in his "Admin Skin" and "Debug" mods.
       
      Thanks community, here's hoping someone will step up!
    • By victorks
      my first work in editin :) https://uploaddeimagens.com.br/imagens/20180307202515_1-jpg https://uploaddeimagens.com.br/imagens/20180307202245_1-jpg DOWNLOAD: https://www.dropbox.com/s/oq97j7x59362kqe/CASTLEai.sqf?dl=0 AI M2 NEED WAI: https://pastebin.com/GJMnPvZP ON THE MAP: https://pastebin.com/cyqH9rNV  
       
      https://www.dropbox.com/s/oq97j7x59362kqe/CASTLEai.sqf?dl=0
       
       
       
       
       
       
       
       
       
    • By juandayz
      VIDEO:
      If (You dont have a custom compiles.sqf or a custom keyboard.sqf) exitWith { step1;}else{ proceed with step 2; } forEach user; 1-Making a custom compiles.sqf and custom keyboard.sqf
       
       
      2-In your CUSTOM!!! keyboard.sqf at bottom but before the last "_handled" paste:
      3-Create remote_key.sqf  (mpmissions\your instance\scripts\ )
       
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...