View Single Post
  #13  
Old 01-08-2011, 09:02 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
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

__________________
Quote:
Reply With Quote