![]() |
Staff Only check
This function checks if your account is listed in the "staff=" section of the server options, if so it returns "true" and if you're not it returns "false".
Example: The NPC containing the function(s) is named "System/Functions", and the current NPC want to make a IsStaff() check. PHP Code:
The code can be found here: http://www.graal.net/snippet/detail....snippet&id=116 Hopefully you find it usefull, enjoy. |
A smooth way to check for access. Though what about something like: HasAccess("Staff/Boots")
|
Quote:
|
Nice Ziro! Like this players still have access to the server, but you can limit their actions, without having another flag (in Control-NPC for example) to update each time you hire / fire a person.
|
Quote:
|
Quote:
|
Mods: Mind moving this to the Code Gallery?
|
link doesnt work for me =(
|
Quote:
|
yeah works now
|
I hate using serverr flags for anything. I'd use a DBNPC called StaffRights and use functions like this:
PHP Code:
|
Quote:
|
I use serverr strings if everbody will be checking them alot. Otherwise i use other methods. Also - that script i wrote for a DB can easily be converted into other similar things.
|
Quote:
|
| All times are GMT +2. The time now is 03:09 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.