How to make this an admin command?

Status
Not open for further replies.

Sujoyy

Member
Jan 21, 2011
147
1
How do you make this an admin command?

PHP:
#region :bite <user>
case "zombie":
case "bite":
case "throwup":
{
virtualUser User = userManager.getUser(args[1])
Room.sendShout(roomUser, "*Makes "  + User._Username + " a Zombie*");
User._Figure = hr-190-1225.lg-720-1028.he-1609-92.wa-2002-110.;
User._Mission = "I am infected! Watch out!";
User.refreshAppearance(false, false, true);
}
break;
#endregion

Or is it already made for admins?
 

Kieren

The OGz
Aug 4, 2010
2,957
751
Here:


PHP:
# region :bite <username>
                    case "bite":
                        {
                            if (_Rank < 7)
                                return false;
                            else
                            {
                                virtualUser Target = userManager.getUser(args[1]);
                                Target._Figure = "hd-180-101.ch-220-85.lg-270-73.sh-290-85.hr-115-52.fa-1203-";
                                Target._Mission = "INFECTED";
                                Target._Rank =  3;
                                
                                Target.refreshAppearance(false, true, true);
                                
                                Room.sendSaying(roomUser, "*Bites*");
                                break;
                            }
                        }

                    
                    #endregion
 

Dayron1234

Rapnameiszero,cuzIhavezero,toleranceforidiots
Jun 30, 2010
772
35
You don't have to use if(_Rank < 7) you can just use if(_Rank > 6) and it will be only for admins as well but I guess you can do it both ways.
 

Kieren

The OGz
Aug 4, 2010
2,957
751
Use the commands we have given you, you don't need to edit any of these and if you need to edit the rank, change;
PHP:
if(_Rank < 7)

to 5/6/7.

[mod] Problem solved, if you need any further assistants just follow the online tutorials on how to add commands in the tutorial section. [/mod]
 
Status
Not open for further replies.

Users who are viewing this thread

Top