PDA

View Full Version : staff list


xAndrewx
12-04-2007, 08:33 PM
is there a way to check if a player that appears in the playerlist under 'staff'? would be a cool feature, like wearing a staff tag ^^

Tigairius
12-04-2007, 08:56 PM
is there a way to check if a player that appears in the playerlist under 'staff'? would be a cool feature, like wearing a staff tag ^^
player.isadmin

xAndrewx
12-04-2007, 09:13 PM
no?

Admins
12-04-2007, 09:42 PM
On serverside it's not possible yet, I have added it now though so it will work with the next update of the npcserver.

cbk1994
12-04-2007, 11:07 PM
player.isAdmin tends to not work so well. It was to get server optons possible, but then they disabled Client-RC in normal scripts.

Tigairius
12-04-2007, 11:49 PM
player.isAdmin tends to not work so well. It was to get server optons possible, but then they disabled Client-RC in normal scripts.

You can still get serveroptions. 'echo(serveroptions.staff);' would return everything on the staff list. 'serveroptions' is serverside only and player.isAdmin is clientside only.

Inverness
12-05-2007, 12:45 AM
function onActionPlayerOnline() {
if (serveroptions.staff.tokenize(",").index(player.account) > -1) {
clientr.staff = true;
}
else {
clientr.staff = false;
}
}

While that script will mark people who are staff on the server, if you want to get people who appear under staff in the playerlist then you'll need to get the serveroptions.staffguilds and compare that with the player's guild.

xAndrewx
12-05-2007, 09:38 AM
player.clientr.isStaff = (player.account in serveroptions.staff.tokenize());

i use that on Zodiac.

Inverness
12-05-2007, 10:39 AM
Since dynamic variables are case-sensitive its usually better to keep them lower-case, unless this somehow behaves differently for client flags.

Tolnaftate2004
12-05-2007, 08:26 PM
its usually better to keep them lower-case
Can't see why it would matter.

Tigairius
12-05-2007, 08:41 PM
Can't see why it would matter.

Easier for future scripters if you keep everything lowercase, I guess.

Angel_Light
12-05-2007, 11:40 PM
http://forums.graalonline.com/forums/showthread.php?t=71878