Closed Spoffy closed 5 years ago
Can you make Admins exempt from the check?
That would be nice. What also would be nice is that you can go from (not petros side) to (petros side) without a timeout, but you have a timeout when you want to join the pvp side. This could be handy as sometimes also a member needs to switch fast for some HQ stuff in case the only member in rebel side goes offline.
Something like this
_adminState = call BIS_fnc_admin;
if (_adminState = 2) then {_timeout = 0;} else {_timeout = 120};
I know it's only an example but I would make the time-out at least 5 minutes, maybe even 10 minutes.
Think this should do it.
if !(isServer) exitWith {};
_unit = _this select 0;
_adminState = admin owner _unit;
if (playerHasBeenPvP isEqualTo []) exitWith {};
_leave = false;
_id = getPlayerUID _unit;
{
if (_id == _x select 0 && _adminState != 2) then
{
if (time - 3600 <= _x select 1) then
{
_leave = true
};
};
} forEach playerHasBeenPvP;
if (_leave) then
{
["noPvP",false,1,false,false] remoteExec ["BIS_fnc_endMission",_unit];
"Antistasi: player kicked because he has been rebel recently" remoteExec ["diag_log",_unit];
};
Cheers for the code Toa, done in 4ad6da368dbcde696aef737bedaf2499be1a8cfb
dont make it too long as admins might have to switch to fix issues rebels have while playing PVP