When checking if they're Staff I like to use a clientr variable and add Staff weapons and tools accordingly.
In your Control-NPC:
PHP Code:
function onActionPlayerOnline() {
// Check if Player Is Staff
clientr.isStaff = isStaff(player.account);
// Add Staff Weapons if Neccesary
if (clientr.isStaff) {
player.addweapon("-Staff/SuperSecretAwesomeTool");
}
}
function isStaff(account) {
return serveroptions.staff.tokenize(",").index(@ account) > (- 1);
}
Then in your other scripts you can use:
PHP Code:
if (clientr.isStaff) {
// do this because they're staff
}