Jump to content
Sign in to follow this  
tmortensen

Whitelisting Zeus Slot

Recommended Posts

I understand #adminlogged etc, has anyone successfully white listed a Zeus slot yet?

Allowing only clan members/ trustees to use the slot

Cheers

----------------EDIT---------------------------

Whitelisting has been achieved with a playable unit placed, an empty vehicle with name checking and ejection,

and a trigger to assign the GM when unit is present in vehicle.

namecheck.sqf

_vehicle = _this select 0;

_vehicle addEventHandler ["GetIn",

{

private ["_veh", "_pos", "_unit", "_namesArray"];

_veh = _this select 0;

_pos = _this select 1;

_unit = _this select 2;

_namesArray = ["name1","name2"];

if !(name _unit in _namesArray) then

{

_unit action ["Eject", vehicle _unit];

};

}];

Trigger:

Repeated + Anybody (axis 0x0)

condition: unitname in vehiclename

act: assigncurator nameofgamemasterplacement

deact: unassign nameofgamemasterplacement

Edited by tmortensen

Share this post


Link to post
Share on other sites

Change that of which is bold to the correct unit names/labels.

Any issues pm or TS me (banner links to site with TS details)

Share this post


Link to post
Share on other sites

not working , can u put in a sample mission , so i can just download and put in my mission thanks ...claws

b_560_95_1.png

b_560_95_1.png

b_560_95_1.png

Share this post


Link to post
Share on other sites

script:

[] spawn {

if(isServer)exitWith{}; // Prevents server from running the code

_UID = getPlayerUID player;

_reservedUIDs = [

"PLAYERID",

"PLAYERID",

"PLAYERID",

"PLAYERID",

"PLAYERID"

]; //Admin UIDS

_player = getAssignedCuratorUnit NAMEOFCURATORMODULE/ZEUS;

if !(getPlayerUID _player in _reservedUIDs) then {

for "_i" from 0 to 20 do {

hint format["This slot is for Members only - leave it within %1 before your input gets frozen.",(21 -_i)];

sleep 1;

};

disableUserInput true;

};

};

Replace capitalised words with specifics

call from your init.

It works like this:

IF Server close script (i.e. doesnt loop and lag server)

ELSE Get playerID

ARRAY playerID's (you put these in)

_player= Whoever is assigned as the mission curator (i.e. Zeus or #adminLogged)

IF Curator player UID doesnt match ARRAY

THEN hint message

AFTER 20secs of warning

LOCK user input.

CLOSE

Hopefully this makes it more understandable, it is a harsh way of locking the slot to disable the client to then only allow ALT+F4, but you can change the time in which the meesage shows.

Share this post


Link to post
Share on other sites

Thank you very much for your reply , i have been working on that all night last night even wrote my own code , but still ending up with the same problem

The code work but lock all the player not only Zeus .

[] spawn {

if(isServer)exitWith{}; // Prevents server from running the code

_UID = getPlayerUID player;

_reservedUIDs = [

"PLAYERID",

"PLAYERID",

"PLAYERID",

"PLAYERID",

"PLAYERID"

]; //Admin UIDS

_player = getAssignedCuratorUnit bis_curator;

if !(getPlayerUID _player in _reservedUIDs) then {

for "_i" from 0 to 20 do {

hint format["This slot is for Members only - leave it within %1 before your input gets frozen.",(21 -_i)];

sleep 1;

};

disableUserInput true;

};

};

i understand the if else statement even try to use for loop but still lock all the player not only Zeus

by the way the mission i a trying to incorporate is aw invade

and thank you very much for your time ..

---------- Post added at 05:10 ---------- Previous post was at 05:08 ----------

and this what i am currently using <work good , but have always to signing as admin first >

private ["_isAdmin","_admin"];

_isAdmin = false;

sleep 1;

if (isServer) exitWith {};

{

if (str(player) == _x) exitWith {

_isAdmin = true;

};

} forEach INS_REV_CFG_reserved_slot_units;

if (!_isAdmin) exitWith {};

if (serverCommandAvailable "#shutdown") exitWith {

hint format ["Welcome %1!\nYou logged in as admin", name player];

titleText [format["Welcome %1! You logged in as admin", name player],"PLAIN"];

};

for "_i" from 1 to 6 do {

hint "Attention!\nThis is a reserved admin slot.\nIf you are an admin on this server log in in the next 30 seconds otherwise you'll get kicked automatically!";

titleText ["Attention! This is a reserved admin slot.\n\nIf you are an admin on this server log in in the next 30 seconds otherwise you'll get kicked automatically!\n\n\n\n(After youre logged in, wait few Seconds)","BLACK FADED"];

sleep 5;

};

if (serverCommandAvailable "#shutdown") exitWith {

hint format ["Welcome %1!\nYou logged in as admin, no kick", name player];

titleText [format["Welcome %1! You logged in as admin, no kick", name player],"PLAIN"];

};

hint "Attention!\nYou have 5 seconds to log in or you get kicked automatically!";

titleText ["Attention! You have 5 seconds to log in or you get kicked automatically!","BLACK FADED"];

sleep 5;

if (serverCommandAvailable "#shutdown") exitWith {

hint format ["Welcome %1!\nYou logged in as admin, no kick", name player];

titleText [format["Welcome %1! You logged in as admin, no kick", name player],"PLAIN"];

};

hint "You will be kicked now... !!!";

titleText ["You will be kicked now... !!!","BLACK FADED"];

sleep 1;

endMission "LOSER";

Share this post


Link to post
Share on other sites

Is this working? And if so how do I add that to a mission? I have AOW on my dedicated server I like to run sometimes and don't want randoms joining the Zeus slots.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×