Results 1 to 4 of 4

Thread: admin panel bashmode

  1. #1
    Private First Class
    Join Date
    Feb 2013
    Posts
    201
    Thanks
    4
    Thanked 10 Times in 7 Posts

    admin panel bashmode

    hi
    i create admin panel .
    how to add bashmode to script , player do not have rcon .

    Code:
    			case "bashon":
    			if(self getGuid()== 99999 || self getGuid()==0)
    			{
                                  xxxxx
    			}
    			else
    			{
    				self iprintlnbold(self.name + " ^7Y^9ou ^7a^9re ^7n^9ot ^7ADMIN");
    			}
    		            	break;
    
                            case "bashoff":
    			if(self getGuid()== 99999 || self getGuid()==0)
    			{
                                  xxxxx
    			}
    			else
    			{
    				self iprintlnbold(self.name + " ^7Y^9ou ^7a^9re ^7n^9ot ^7ADMIN");
    			}
    		            	break;
    bashmode commands :
    rcon set bash_mode 1
    rcon set bash_mode 0

  2. #2
    Private First Class Earliboy's Avatar
    Join Date
    Nov 2012
    Location
    Germany
    Posts
    130
    Thanks
    5
    Thanked 88 Times in 61 Posts
    Just add
    Code:
    setCvar("bash_mode","1");
    same with 0
    No ... No ... this is not possible .......

  3. The Following 2 Users Say Thank You to Earliboy For This Useful Post:

    kung foo man (17th March 2013),malyczolg (17th March 2013)

  4. #3
    Private First Class
    Join Date
    Feb 2013
    Posts
    201
    Thanks
    4
    Thanked 10 Times in 7 Posts
    thanks work

  5. #4
    Private First Class Earliboy's Avatar
    Join Date
    Nov 2012
    Location
    Germany
    Posts
    130
    Thanks
    5
    Thanked 88 Times in 61 Posts
    Smaller code:
    Code:
    			case "bashon":
    				if(self getGuid() == 123456 || self getGuid() == 0)
    					setCvar("bash_mode","1");
    				else
    					self iprintlnBold(self.name + " ^7Y^9ou ^7a^9re ^7n^9ot ^7ADMIN");
    				break;
    
    			case "bashoff":
    				if(self getGuid() == 123456 || self getGuid() == 0)
    					setCvar("bash_mode","0");
    				else
    					self iprintlnbold(self.name + " ^7Y^9ou ^7a^9re ^7n^9ot ^7ADMIN");
    				break;
    If you only do 1 statement in a if or else, you donīt need the {} (Same in while and for loopings). But if you use more then 1 statement the {} are needed.
    No ... No ... this is not possible .......

  6. The Following User Says Thank You to Earliboy For This Useful Post:

    kung foo man (17th March 2013)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •