lucho Posted July 17, 2016 Report Share Posted July 17, 2016 if (nearestObject [player,"Land_MBG_HeavyShelter"] < 500) exitWith { systemChat 'You cannot suicide.'; }; i will only set when you near Land_MBG_HeavyShelter <500 you cannot suicide but still not work.... or maybe like this _blockedSuicidezones= [ [[1167.69,2516.06,0.0014472],250,false], [[6352.43,7789.2,0.00140381],150,false], [[1767.52,7797.28,0.00161743],250,false] ]; Link to comment Share on other sites More sharing options...
0 juandayz Posted July 17, 2016 Report Share Posted July 17, 2016 do you wanna execute suicide script if u are into X cords radius? well more easy.. open your mission.sqm find class Sensors { items=6; ////put +1. example: items =7; at the end of class sensors... paste: Spoiler class Item7 { position[]={YOUR COORDS HERE.... you need invert in this orderl... first, last , middle coords.}; a=500; //radius b=500;//radius activationBy="WEST"; repeating=1; interruptable=1; age="UNKNOWN"; name="ZoneSuicide"; expCond="(vehicle player) in thislist;"; expActiv="ZoneSuicide = [] execVM ""custom\suicide.sqf"";"; expDesactiv="terminate ZoneSuicide; titleText [""Youre in Suicide Zone!"", ""PLAIN DOWN"", 3];"; class Effects { }; }; now create a suicide script.sqf and paste into custom folder. suicide.sqf Spoiler private ["_Secondary","_onLadder","_player"]; _player = player; _Secondary = currentWeapon _player; suicide_answer=nil; if (dayz_combat == 1) exitWith {cutText ["You are in combat", "PLAIN DOWN"];}; DamiSpawn = [ ["Suicide Confirmation",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 { cutText["You have grown tired of this endless battle.","PLAIN DOWN"]; _player playmove "ActsPercMstpSnonWpstDnon_suicide1B"; sleep 8.4; _player fire _Secondary; _selection = "body"; _player setHit["body",1]; }; Link to comment Share on other sites More sharing options...
0 lwbuk Posted July 17, 2016 Report Share Posted July 17, 2016 I think he is trying to block suicide at certain places if I read it right. I wanted something similar as one of admins created a jail to but naughty players and we wanted to stop them committing suicide in there. Link to comment Share on other sites More sharing options...
0 juandayz Posted July 17, 2016 Report Share Posted July 17, 2016 mmm well if u need block suicide , a way can be add a restriction into suicide script. suicide.sqf Spoiler private ["_blockedSuicidezones","_playerPos","_nearsuicidearea","_Secondary","_onLadder","_player"]; _player = player; _Secondary = currentWeapon _player; suicide_answer=nil; _blockedSuicidezones = [[1167.69,2516.06,0.0014472],[6352.43,7789.2,0.00140381],[1767.52,7797.28,0.00161743]]; _playerPos = getPosATL player; _nearsuicidearea = count nearestObjects [_playerPos, _blockedSuicidezones, 150] > 0; if (dayz_combat == 1) exitWith {cutText ["You are in combat", "PLAIN DOWN"];}; if !(_nearsuicidearea) then { DamiSpawn = [ ["Suicide Confirmation",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 { cutText["You have grown tired of this endless battle.","PLAIN DOWN"]; _player playmove "ActsPercMstpSnonWpstDnon_suicide1B"; sleep 8.4; _player fire _Secondary; _selection = "body"; _player setHit["body",1]; }; }else{ cutText [format[" Your not allowed to suicide in this area "], "PLAIN DOWN"]; }; Link to comment Share on other sites More sharing options...
Question
lucho
if (nearestObject [player,"Land_MBG_HeavyShelter"] < 500) exitWith { systemChat 'You cannot suicide.'; };
i will only set when you near Land_MBG_HeavyShelter <500 you cannot suicide but still not work....
or maybe like this
_blockedSuicidezones=
[
[[1167.69,2516.06,0.0014472],250,false],
[[6352.43,7789.2,0.00140381],150,false],
[[1767.52,7797.28,0.00161743],250,false]
];
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now