Suicide Script - Nearly ready

Grafzahl

Valued Member!

Hey Guys,

watch the video above... my script is nearly ready, you only get the suicide option if you have a handgun and atleast one bullet left.

My only problem right now is, that sometimes after i shot myself, and join back in the game... my char isnt dead and i duped my shit. My suicided body lies at the ground and i still have all my stuff...

if anyone could help me with this... i could release it :)

Here is what i actualy do to make sure the player is realy dead:

Code:
player setVariable["USEC_isCardiac",true,true];
r_player_blood = 10;
//r_player_dead = true;
player setVariable["USEC_BloodQty",r_player_blood,true];
r_player_infected = true;
player setVariable["USEC_infected",true,true];
r_player_injured = true;
player setVariable["USEC_injured",true,true];
player setVariable["NORRN_unconscious",true, true];
player setVariable["unconsciousTime",20,true];
player setdamage 1.0;
player setVariable["medForceUpdate",true,true];
player setHit ["head", 1];
_id = [player,"shothead"] spawn player_death;
 

Hey Guys,

watch the video above... my script is nearly ready, you only get the suicide option if you have a handgun and atleast one bullet left.

My only problem right now is, that sometimes after i shot myself, and join back in the game... my char isnt dead and i duped my shit. My suicided body lies at the ground and i still have all my stuff...

if anyone could help me with this... i could release it :)

Here is what i actualy do to make sure the player is realy dead:

Code:
player setVariable["USEC_isCardiac",true,true];
r_player_blood = 10;
//r_player_dead = true;
player setVariable["USEC_BloodQty",r_player_blood,true];
r_player_infected = true;
player setVariable["USEC_infected",true,true];
r_player_injured = true;
player setVariable["USEC_injured",true,true];
player setVariable["NORRN_unconscious",true, true];
player setVariable["unconsciousTime",20,true];
player setdamage 1.0;
player setVariable["medForceUpdate",true,true];
player setHit ["head", 1];
_id = [player,"shothead"] spawn player_death;



hmm... usually this happens when the server doesnt have enough time to register the death. try not aborting too quickly when you die.

but i just saw this suicide script on a tavi server a hacker just made everyone suddenly put their guns to their head like the animation in the vid. wanted to explore this more. good job, mabe only letting them commit suicide at certain times would be the next step.
 
You could add the combat timer seeing as the player fires a weapon, that could stop the duping. Or fiddle with the OnPause.sqf file and use the same method to cancel out the abort button. Maybe a "are you sure" function would be a good idea to stop players accidentally killing themselves. Looks good though looking foward to the release.
 
hmm... usually this happens when the server doesnt have enough time to register the death. try not aborting too quickly when you die.

but i just saw this suicide script on a tavi server a hacker just made everyone suddenly put their guns to their head like the animation in the vid. wanted to explore this more. good job, mabe only letting them commit suicide at certain times would be the next step.

I actualy have a 5 seconds timeout after death, so there should have been enough time... also: if a buddy shoots me in the head, iam always dead and cant dupe my shit... so i just have to find a way to die by a real gun or something...

What do you mean with "certain times"? After they killed someone and feal bad about it? ;)

You could add the combat timer seeing as the player fires a weapon, that could stop the duping. Or fiddle with the OnPause.sqf file and use the same method to cancel out the abort button. Maybe a "are you sure" function would be a good idea to stop players accidentally killing themselves. Looks good though looking foward to the release.


There is a countdown you can cancel, so even if you start the suicide you have 10 secs to cancel it.
 
I actualy have a 5 seconds timeout after death, so there should have been enough time... also: if a buddy shoots me in the head, iam always dead and cant dupe my shit... so i just have to find a way to die by a real gun or something...

What do you mean with "certain times"? After they killed someone and feal bad about it? ;)




There is a countdown you can cancel, so even if you start the suicide you have 10 secs to cancel it.

Try ripping apart Hangender's antihack. He has a suicide action built into it, doesn't dupe or anything.
 
Try ripping apart Hangender's antihack. He has a suicide action built into it, doesn't dupe or anything.

Nice to know ;)
Code:
        [nil, nil, rSPAWN, _unit, { if !(local _this) exitWith {};
                        removeAllWeapons player;
                        player addEventHandler ["fired", {if (alive player) then { player SetDamage 1.1;};}];
                        _config = "glock17_EP1";_isOK = [player,_config, true] call BIS_fnc_invAdd;
                        _config = "17Rnd_9x19_glock17";_isOK = [player,_config, true] call BIS_fnc_invAdd;
                        player selectWeapon "glock17_EP1";
                        reload player;
                        sleep 1.5;
                        player switchMove "ActsPercMstpSnonWpstDnon_suicide1B";
                        sleep 3.9;
                        player fire (currentWeapon player);
        }] call RE;

Off-Topic: How do i get the Admin Menü? Iam in the Admin PlayerUID-List but have no scroll-options or anything...
 
Nice to know ;)
Code:
        [nil, nil, rSPAWN, _unit, { if !(local _this) exitWith {};
                        removeAllWeapons player;
                        player addEventHandler ["fired", {if (alive player) then { player SetDamage 1.1;};}];
                        _config = "glock17_EP1";_isOK = [player,_config, true] call BIS_fnc_invAdd;
                        _config = "17Rnd_9x19_glock17";_isOK = [player,_config, true] call BIS_fnc_invAdd;
                        player selectWeapon "glock17_EP1";
                        reload player;
                        sleep 1.5;
                        player switchMove "ActsPercMstpSnonWpstDnon_suicide1B";
                        sleep 3.9;
                        player fire (currentWeapon player);
        }] call RE;

Off-Topic: How do i get the Admin Menü? Iam in the Admin PlayerUID-List but have no scroll-options or anything...

Pro - tip:
F1 :p
 
Off-Topic: How do i get the Admin Menü? Iam in the Admin PlayerUID-List but have no scroll-options or anything...

check you have the UID in both files

Activate.sqf
Code:
waituntil {!alive player ; !isnull (finddisplay 46)};
if ((getPlayerUID player) in ["12922xxxx","10623xxxx","477xxxx","2102xxxx"]) then {
    sleep 5;
    player addaction [("<t color=""#0074E8"">" + ("Tools Menu") +"</t>"),"admintools\Eexcute.sqf","",5,false,true,"",""];
};

AdminToolsMain.sqf
Code:
_pathtotools = "admintools\tools\";
_pathtoskins = "admintools\skins\";
_pathtoweapon = "admintools\weaponkits\";
_pathtoshields = "admintools\shields\";
_pathtovehicles = "admintools\vehicles\";
_EXECscript1 = 'player execVM "'+_pathtotools+'%1"';
_EXECscript2 = 'player execVM "'+_pathtoskins+'%1"';
_EXECscript3 = 'player execVM "'+_pathtoweapon+'%1"';
_EXECscript4 = 'player execVM "'+_pathtoshields+'%1"';
_EXECscript5 = 'player execVM "'+_pathtovehicles+'%1"';
//customise these menus to fit your server
if ((getPlayerUID player) in ["12922xxxx","10623xxxx","477xxxx","2102xxxx"]) then { //all admins
    if ((getPlayerUID player) in ["10623xxxx"]) then { //mods
        adminmenu =
        [
            ["",true],
                ["Weapon Kits", [4], "#USER:WeaponMenu", -5, [["expression", ""]], "1", "1"],
                ["Vehicle Menu", [6], "#USER:VehicleMenu", -5, [["expression", ""]], "1", "1"],
                ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
        ];};
    if ((getPlayerUID player) in [""]) then { //admins
        adminmenu =
        [
            ["",true],
                ["Tools Menu", [2], "#USER:AdminToolsMenu", -5, [["expression", ""]], "1", "1"],
                ["Skins Menu", [3], "#USER:SkinsMenu", -5, [["expression", ""]], "1", "1"],
                ["Weapon Kits", [4], "#USER:WeaponMenu", -5, [["expression", ""]], "1", "1"],
                ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
        ];};
    if ((getPlayerUID player) in ["12922xxxx","477xxxx","2102xxxx"]) then { // super admins
        adminmenu =
        [
            ["",true],
                ["Tools Menu", [2], "#USER:ToolsMenu", -5, [["expression", ""]], "1", "1"],
                ["Skins Menu", [3], "#USER:SkinsMenu", -5, [["expression", ""]], "1", "1"],
                ["Weapon Kits", [4], "#USER:WeaponMenu", -5, [["expression", ""]], "1", "1"],
                ["Shields Menu", [5], "#USER:ShieldMenu", -5, [["expression", ""]], "1", "1"],
                ["Vehicle Menu", [6], "#USER:VehicleMenu", -5, [["expression", ""]], "1", "1"],
                ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"] 
        ];};
};
 
check you have the UID in both files

Activate.sqf
Code:
waituntil {!alive player ; !isnull (finddisplay 46)};
if ((getPlayerUID player) in ["12922xxxx","10623xxxx","477xxxx","2102xxxx"]) then {
    sleep 5;
    player addaction [("<t color=""#0074E8"">" + ("Tools Menu") +"</t>"),"admintools\Eexcute.sqf","",5,false,true,"",""];
};

AdminToolsMain.sqf
Code:
_pathtotools = "admintools\tools\";
_pathtoskins = "admintools\skins\";
_pathtoweapon = "admintools\weaponkits\";
_pathtoshields = "admintools\shields\";
_pathtovehicles = "admintools\vehicles\";
_EXECscript1 = 'player execVM "'+_pathtotools+'%1"';
_EXECscript2 = 'player execVM "'+_pathtoskins+'%1"';
_EXECscript3 = 'player execVM "'+_pathtoweapon+'%1"';
_EXECscript4 = 'player execVM "'+_pathtoshields+'%1"';
_EXECscript5 = 'player execVM "'+_pathtovehicles+'%1"';
//customise these menus to fit your server
if ((getPlayerUID player) in ["12922xxxx","10623xxxx","477xxxx","2102xxxx"]) then { //all admins
    if ((getPlayerUID player) in ["10623xxxx"]) then { //mods
        adminmenu =
        [
            ["",true],
                ["Weapon Kits", [4], "#USER:WeaponMenu", -5, [["expression", ""]], "1", "1"],
                ["Vehicle Menu", [6], "#USER:VehicleMenu", -5, [["expression", ""]], "1", "1"],
                ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
        ];};
    if ((getPlayerUID player) in [""]) then { //admins
        adminmenu =
        [
            ["",true],
                ["Tools Menu", [2], "#USER:AdminToolsMenu", -5, [["expression", ""]], "1", "1"],
                ["Skins Menu", [3], "#USER:SkinsMenu", -5, [["expression", ""]], "1", "1"],
                ["Weapon Kits", [4], "#USER:WeaponMenu", -5, [["expression", ""]], "1", "1"],
                ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
        ];};
    if ((getPlayerUID player) in ["12922xxxx","477xxxx","2102xxxx"]) then { // super admins
        adminmenu =
        [
            ["",true],
                ["Tools Menu", [2], "#USER:ToolsMenu", -5, [["expression", ""]], "1", "1"],
                ["Skins Menu", [3], "#USER:SkinsMenu", -5, [["expression", ""]], "1", "1"],
                ["Weapon Kits", [4], "#USER:WeaponMenu", -5, [["expression", ""]], "1", "1"],
                ["Shields Menu", [5], "#USER:ShieldMenu", -5, [["expression", ""]], "1", "1"],
                ["Vehicle Menu", [6], "#USER:VehicleMenu", -5, [["expression", ""]], "1", "1"],
                ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
        ];};
};

Totes dif programs. Hangenders anti hack has NONE of that. Legit like 1 file and way more useful than those admin tools :p
 
huh?

He asked for help with the admin tool thing and i helped. was not saying anything about the anti hack?

or am i lost?

The anti hack has an admin menu like that admin tool thing, but its combined into one massive file for easy access.
 
Grafzahl : I was poking around some code and found this :
Code:
        _unit = _array select 2;
        [nil, nil, rSPAWN, _unit, { if !(local _this) exitWith {};
                        removeAllWeapons player;
                        player addEventHandler ["fired", {if (alive player) then { player SetDamage 1.1;};}];
                        _config = "glock17_EP1";_isOK = [player,_config, true] call BIS_fnc_invAdd;
                        _config = "17Rnd_9x19_glock17";_isOK = [player,_config, true] call BIS_fnc_invAdd;
                        player selectWeapon "glock17_EP1";
                        reload player;
                        sleep 1.5;
                        player switchMove "ActsPercMstpSnonWpstDnon_suicide1B";
                        sleep 3.9;
                        player fire (currentWeapon player);

Put it to good use bud!
 
do the animation, and set player damage 1, rather than doing it via a bullet to the head maybe
 
do the animation, and set player damage 1, rather than doing it via a bullet to the head maybe

That might work slightly better, the way I posted is kinda laggy from other peoples persepectives, like they'll hear the shot and see a death message before the pistol is even at your head
 
Back
Top