stop them respawning

psychognatz

New Member
Hi,

I got some issues on my Server with the "respawn" button !

this is my is my player_onPause.sqf :
Code:
private["_display","_btnRespawn","_btnAbort","_timeOut","_timeMax","_isDead"];
        disableSerialization;
        waitUntil {
            _display = findDisplay 49;
            !isNull _display;
        };
        sleep 1;
        _btnRespawn = _display displayCtrl 1010;
        _btnAbort = _display displayCtrl 104;
        _btnRespawn ctrlEnable false;
        _btnAbort ctrlEnable false;
        _timeOut = 0;
        _timeMax = 3;
       
        if(r_player_dead) exitWith {_btnAbort ctrlEnable true;};
        if(r_fracture_legs) exitWith {_btnRespawn ctrlEnable true;};
               
        while {!isNull _display} do {
            switch true do {
                case ({isPlayer _x} count (player nearEntities ["AllVehicles", 6]) > 1) : {
                    _btnAbort ctrlEnable false;
                    cutText ["Cannot Abort near another player!", "PLAIN DOWN"];
                };
                case (_timeOut < _timeMax && count (player nearEntities ["zZombie_Base", 50]) > 0) : {
                    _btnAbort ctrlEnable false;
                    cutText [format ["Can Abort in %1", (_timeMax - _timeOut)], "PLAIN DOWN"];
                    _timeOut = _timeOut + 1;
 
                };
                case (player getVariable["combattimeout", 0] >= time) : {
                    _btnAbort ctrlEnable false;
                    cutText ["Cannot Abort while in combat!", "PLAIN DOWN"];               
                };
                default {
                    _btnAbort ctrlEnable true;
                    cutText ["", "PLAIN DOWN"];               
                };
            };
            sleep 3;
        };
        cutText ["", "PLAIN DOWN"];

My problem is, if the Server is up for ~2h and longer, there is a very little lag if pressing "escape" and if somebody is spamming "escape", the "respawn" button is white for just like 0.2-0.4 secs. And if he manages to click that button fast enough, he will die. But if he comes back in the game then, he spawns at the position where he died with same gear and also his corpse with the gear is lying on the ground. That means, ppl can dupe their Items with that glitch...

what can I do to prevent them from doing that? any ideas ?
 
Back
Top