View Single Post
  #12  
Old 09-14-2006, 02:43 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Quote:
Originally Posted by 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!");
Server strings are used when theres too little data to having to 'waste' a DB for it. I mean, come on - an entire database for one string?
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote