Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   staff list (https://forums.graalonline.com/forums/showthread.php?t=77817)

xAndrewx 12-04-2007 08:33 PM

staff list
 
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

Quote:

Originally Posted by xAndrewx (Post 1362134)
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

Quote:

Originally Posted by cbkbud (Post 1362160)
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

PHP Code:

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

Quote:

Originally Posted by Inverness (Post 1362240)
its usually better to keep them lower-case

Can't see why it would matter.

Tigairius 12-05-2007 08:41 PM

Quote:

Originally Posted by Tolnaftate2004 (Post 1362292)
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...ad.php?t=71878


All times are GMT +2. The time now is 09:58 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.