How i can make that people can not suicide near safezone?
suicide.sqf
private ["_position","_done","_timeLeft","_exitWith","_warning","_display","_weapon"];
// initialize variables
_weapon = _this;
_exitWith = "nil";
_done = false;
_position = position player;
_timeLeft = DZE_SUICIDE_CANCEL_TIME;
_warning = "You will commit suicide in %1 seconds. Move to cancel!";
removeAllWeapons player;
removeAllItems player;
removeBackpack player;
// close the gear display when player starts to commit suicide
disableSerialization;
_display = findDisplay 106;
if(!(isNull _display)) then {
_display closeDisplay 0;
};
// if we didn't get an exit reason back, time to die!
if (_exitWith == "nil") then {
_exitWith = "Goodbye!";
taskHint[_exitWith, DZE_COLOR_SUCCESS, "taskDone"];
hint _exitWith;
cutText[_exitWith,"PLAIN DOWN"];
player selectWeapon _weapon;
player switchMove "";
player playActionNow "stop";
player playMove (["ActsPercMstpSnonWpstDnon_suicide1B","ActsPercMstpSnonWpstDnon_suicide2B"] call BIS_fnc_selectRandom);
sleep 7.5;
player fire _weapon;
sleep 1;
player setDamage 1.5;
} else {
taskHint[_exitWith, DZE_COLOR_DANGER, "taskFailed"];
cutText[_exitWith,"PLAIN DOWN"];
};
Question
lucho
How i can make that people can not suicide near safezone?
suicide.sqf
private ["_position","_done","_timeLeft","_exitWith","_warning","_display","_weapon"]; // initialize variables _weapon = _this; _exitWith = "nil"; _done = false; _position = position player; _timeLeft = DZE_SUICIDE_CANCEL_TIME; _warning = "You will commit suicide in %1 seconds. Move to cancel!"; removeAllWeapons player; removeAllItems player; removeBackpack player; // close the gear display when player starts to commit suicide disableSerialization; _display = findDisplay 106; if(!(isNull _display)) then { _display closeDisplay 0; }; // if we didn't get an exit reason back, time to die! if (_exitWith == "nil") then { _exitWith = "Goodbye!"; taskHint[_exitWith, DZE_COLOR_SUCCESS, "taskDone"]; hint _exitWith; cutText[_exitWith,"PLAIN DOWN"]; player selectWeapon _weapon; player switchMove ""; player playActionNow "stop"; player playMove (["ActsPercMstpSnonWpstDnon_suicide1B","ActsPercMstpSnonWpstDnon_suicide2B"] call BIS_fnc_selectRandom); sleep 7.5; player fire _weapon; sleep 1; player setDamage 1.5; } else { taskHint[_exitWith, DZE_COLOR_DANGER, "taskFailed"]; cutText[_exitWith,"PLAIN DOWN"]; };
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now