DayZ EPOCH - Knockout Script

Flodding

New Member
Hey folks...

i hope my english isnt too bad... im german so please if you dont understand what i mean ask one more time ;)

Okay to the thread now...

Im hosting a DayZ EPOCH Chernarus 1.0.2.3 Server on my Linux vServer virtual machine...
this runs perfectly and i got no problems... if there are any questions about this im comfortable with it when you ask me how to get it working ;)

nevermind... i have a couple of Scripts/Addons or else we wanna call them... just one thing makes problems.
My mates and players asked me to install a Mod called "Knockout-Script".
So i did install it and i got an orange extra menuitem to KNOCKOUT!...
but everytime its gonna be used the char who should "KNOCK" the other player just ... im calling it "bends over" ... i know its not right, but i had a very big trouble with this... so i had to find a way to laugh about it ;)

i followed the instructions on this tutorial page:
http://opendayz.net/threads/release-player2s-knockout.12533/

Is this just outdated?
Can someone get this back working?

The downloadlinks are Out Of Date... dunno why... maybe because this isnt working at the moment.
the files are hardly to find... ive attached those files you need to download so you can try by yourself...

Thanks for any Help getting this working again...

Flo

PS: I just saw i couldnt attach something... or im just too blind...

heres the code of the files:

knockout.sqf

Code:
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

Code:
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"];
};
 
Back
Top