View Single Post
  #11  
Old 09-14-2006, 08:21 AM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
I hate using serverr flags for anything. I'd use a DBNPC called StaffRights and use functions like this:

PHP Code:
public function checkrights(ply,right)
{
  
temp.check this.(ply@"_rights").index(right);
  if (
temp.check >= 0) return true;
  else return 
false;
}

public function 
addrights(ply,right)
{
  if (
this.(ply@"_rights").index(right) < 0)
  {
    
this.(ply@"_rights").add(right);
    return 
true;
  }
  else return 
false;
}

public function 
removerights(ply,right)
{
  if (
this.(ply@"_rights").index(right) >= 0)
  {
    
this.(ply@"_rights").remove(right);
    return 
true;
  }
  else return 
false;

This could be used in many other things as well. Thus i'd use StaffRights.addrights("Twinny","MonkeyPowers!");
Reply With Quote