xProlithium
New Member
The current suicide script is perfect for doing exactly what it is intended for. Is there a possible way to add a confirmation to that? Perhaps another scroll wheel option saying "Confirm" and "Back out"?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
The current suicide script is perfect for doing exactly what it is intended for. Is there a possible way to add a confirmation to that? Perhaps another scroll wheel option saying "Confirm" and "Back out"?
systemChat ('Are you sure you wish to kill yourself?');
cutText [" \nUse your scroll wheel to confirm or deny!","PLAIN"];
execVM "suicide\suicide_confirm.sqf";
pathtosuicide = "suicide\";
EXECscript1 = 'player execVM "'+pathtosuicide+'%1"';
Suicideconfirm =
[
["",false],
["Confirm suicide?", [2], "", -5, [["expression", format[EXECscript1,"suicide.sqf"]]], "1", "1"],
["", [-1], "", -5, [["expression", ""]], "1", "0"],
["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];};
showCommandingMenu "#USER:Suicideconfirm";
Thanks![]()
// ---------------------------------------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------------------------------------
ya nothing comes up for confirmation on the scroll wheel. it does initiate the suicide_exec though but everytime i hit commit suicide again it just repeats asking am i sure i want to kill myself
systemChat ('Are you sure you wish to kill yourself?');
cutText [" \nUse your scroll wheel to confirm or deny!","PLAIN"];
execVM "suicide\suicide_confirm.sqf";
i have fn_selfactions pointing to suicide_exec.sqf then i have suicide_exec.sqf pointing to suiccide_confirm.sqf, then suicide_confirm.sqf is pointing to the actual suicide.sqf
fn_selfactions executes the suicide_exec.sgf because it actually shows the text ingame but just no confirmation selection
Code:systemChat ('Are you sure you wish to kill yourself?'); cutText [" \nUse your scroll wheel to confirm or deny!","PLAIN"]; execVM "suicide\suicide_confirm.sqf";
i seem to have the same problem if you guys sort it can i have a copy of your files plzya nothing comes up for confirmation on the scroll wheel. it does initiate the suicide_exec though but everytime i hit commit suicide again it just repeats asking am i sure i want to kill myself
showCommandingMenu "#USER:Suicideco>
Error position: <;};
showCommandingMenu "#USER:Suicideco>
Error Missing ]
File mpmissions\__CUR_MP.chernarus\addons\suicide\suicide_confirm.sqf, line 11
Error in expression <, -3, [["expression", ""]], "1", "1"]
];};
this is my error log
Code:showCommandingMenu "#USER:Suicideco> Error position: <;}; showCommandingMenu "#USER:Suicideco> Error Missing ] File mpmissions\__CUR_MP.chernarus\addons\suicide\suicide_confirm.sqf, line 11 Error in expression <, -3, [["expression", ""]], "1", "1"] ];};
["Confirm suicide?", [2], "", -5, [["expression", format[EXECscript1,"suicide.sqf"]], "1", "1"],
// ---------------------------------------SUICIDE START------------------------------------
private ["_handGun"];
_handGun = currentWeapon player;
if ((_handGun in ["revolver_gold_EP1","glock17_EP1","M9","M9SD","Makarov","MakarovSD","revolver_EP1","UZI_EP1","Sa61_EP1","Colt1911"]) && (player ammo _handGun > 0)) then {
hasSecondary = true;
} else {
hasSecondary = false;
};
if (player ammo _handGun == 1) then {
lastRound = true;
} else {
lastRound = false;
};
if((speed player <= 1) && hasSecondary && lastRound && _canDo) then {
if (s_player_suicide < 0) then {
s_player_suicide = player addaction[("<t color=""#ff0000"">" + ("Commit Suicide") +"</t>"),"addons\suicide\suicide_init.sqf",_handGun,0,false,true,"", ""];
};
} else {
player removeAction s_player_suicide;
s_player_suicide = -1;
};
// ---------------------------------------SUICIDE END------------------------------------
systemChat ('Are you sure you wish to kill yourself?');
cutText [" \nUse your scroll wheel to confirm or deny!","PLAIN"];
execVM "addons\suicide\suicide_confirm.sqf";
pathtosuicide = "addons\suicide\";
EXECscript1 = 'player execVM "'+pathtosuicide+'%1"';
Suicideconfirm =
[
["",false],
["Confirm suicide?", [2], "", -5, [["expression", format[EXECscript1,"suicide.sqf"]]], "1", "1"],
["", [-1], "", -5, [["expression", ""]], "1", "0"],
["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];};
showCommandingMenu "#USER:Suicideconfirm";
pathtosuicide = "addons\suicide\";
EXECscript1 = 'player execVM "'+pathtosuicide+'%1"';
Suicideconfirm =
[
["",false],
["Confirm suicide?", [2], "", -5, [["expression", format[EXECscript1,"addons\suicide\suicide.sqf"]]], "1", "1"],
["", [-1], "", -5, [["expression", ""]], "1", "0"],
["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];};
showCommandingMenu "#USER:Suicideconfirm";
pathtosuicide = "addons\suicide\";
[["expression", format[EXECscript1,"addons\suicide\suicide.sqf"]]]
i made that chasnge but still no good. im not getting the option to confirm or exit... sorry to be a pain matty, i wish i knew more about this to help with it