Is it possible? READ THIS!

07/28/2008 21:25 neverlookback#1
Hi! I was just curious if it was at all possible to make commands (on one's private server) gm only! Especially the /item commands. Because ya'know thats weak lol, so if its impossible just say so, but if you can do it please help thanks =D
07/28/2008 21:35 tanelipe#2
Depends, what source are you using? How do you determine if one is gm?

basic layout would be like this though.
Code:
if(Client.AccountStatus == ADMIN_FLAG)
{
   // Admin commands
}
if(Client.AccountStatus >= GM_FLAG)
{
   // Add commands available only for GMs here
} 
if(Client.AccountStatus >= NORMAL_FLAG)
{
  // Normal player commands
}
Now ofcourse Client.AccountStatus would be replaced w/e code determines ones flag.