Jump to content
  • 0

Suicide in safezone false


lucho

Question

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

  • 0

This is an old suicide script that seemed to stop people attempting to dupe, a long long time ago. Don't know if it still works.

Spoiler

private ["_Secondary"];
_Secondary = currentWeapon player;
suicide_answer=nil;
canAbort = true;
Damisscum = 
[
    ["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:Damisscum";
waitUntil {((!isNil 'suicide_answer')||(commandingMenu == ""))};
if (isNil 'suicide_answer') then {suicide_answer=false;};
if (suicide_answer) then
{
    canAbort = false;
    if (inSafeZone) exitWith {
        inSafeZone = false;
        {player removeMagazine _x} forEach magazines player;
        removeAllWeapons player;
        removeBackpack player;
        removeAllItems player;
        _txt = "Trying to dupe in safezones, are we? Your IP, GUID, and player name has been logged.";
        cutText [_txt,"PLAIN DOWN"];
        systemChat ("Anti-Hack: "+STR _txt+"");
        sleep 5;
        (vehicle player) setVelocity [-500,(random 500),500];
        SafeZoneDupe = "I TRIED TO SUICIDE IN SAFEZONE";
        sleep 1.5;
        (vehicle player) setVelocity [(random 500),-500,-5000];
        sleep 5;
        player setHit ["Head",1];
        [] spawn player_death;
        sleep 1;
        publicVariable "SafeZoneDupe";
    };
    player playmove "ActsPercMstpSnonWpstDnon_suicide1B";
    sleep 8.4;
    player fire _Secondary;
    _unit = player;
    _selection = "body";
    _damage = 1;
    _unit setHit[_selection,_damage];
} else {
    systemChat ("Suicide canceled.");
};

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...