Suicide confirm script

LTGNick

Valued Member!
So i think all those suicide scripts are great but what i never liked is the way to cancel them... it seems if you clicked it... your dead no matter what :p and alot of people would accidently hit it so i found a suicide one that makes you confirm you want to die...

Basically im not gonna go into to much detail but you can take this code and add it to the bottom of ur self actions

Code:
// ---------------------------------------SUICIDE START------------------------------------
private ["_handGun"];
_handGun = currentWeapon player;
if ((_handGun in ["glock17_EP1","M9","M9SD","Makarov","MakarovSD","revolver_EP1","UZI_EP1","Sa61_EP1","Colt1911"]) && (player ammo _handGun > 0)) then {
    hasSecondary = true;
} else {
    hasSecondary = false;
};
if((speed player <= 1) && hasSecondary && _canDo) then {
    if (s_player_suicide < 0) then {
        s_player_suicide = player addaction[("<t color=""#ff0000"">" + ("Commit Suicide") +"</t>"),"suicide.sqf",_handGun,0,false,true,"", ""];
    };
} else {
    player removeAction s_player_suicide;
    s_player_suicide = -1;
};
// ---------------------------------------SUICIDE END------------------------------------
Big thanks to Grafzahl for sharing it

Change the filepath and then use this for suicide script

Code:
private ["_Secondary"];
_Secondary = currentWeapon player;
suicide_answer=nil;
canAbort = true;
DamiSpawn =
[
    ["Confirm?",true],
    ["Are you sure?", [-1], "", -5, [["expression", ""]], "1", "0"],
    ["", [-1], "", -5,         [["expression", ""]], "1", "0"],
    ["No", [2], "", -5,     [["expression", "suicide_answer=false;"]], "1", "1"],
    ["Yes", [3], "", -5,     [["expression", "suicide_answer=true;"]], "1", "1"],
    ["", [-1], "", -5,         [["expression", ""]], "1", "0"],
    ["Exit", [-1], "", -3,     [["expression", "suicide_answer=false;"]], "1", "1"]
];
showCommandingMenu "#USER:DamiSpawn";
waitUntil {((!isNil 'suicide_answer')||(commandingMenu == ""))};
if (isNil 'suicide_answer') then {suicide_answer=false;};
if (suicide_answer) then
{
    canAbort = false;
    player playmove "ActsPercMstpSnonWpstDnon_suicide1B";
    sleep 8.4;
    player fire _Secondary;
    _unit = player;
    _selection = "body";
    _damage = 1;
    _unit setHit[_selection,_damage];
} else {
    systemChat ("Suicide canceled.");
};

BTW i did not come up with any of this i just felt like posting a way to have a confirm option

BIG REMINDER if ur using a antihack make sure you white list this
 
Back
Top