Thread: Commands [PI]

Results 1 to 6 of 6
  1. #1 Commands [PI] 
    Registered Member
    Join Date
    Mar 2012
    Posts
    710
    Thanks given
    19
    Thanks received
    5
    Rep Power
    37
    How can I make this command applicable for 4 certain people?

    if (playerCommand.startsWith("roll")) {
    c.forcedChat("[DICE ROLLED] I ROLLED A "+ Misc.random(9) + + Misc.random(9) +".");
    }
    Reply With Quote  
     

  2. #2  
    Banned
    Join Date
    Oct 2011
    Posts
    270
    Thanks given
    20
    Thanks received
    3
    Rep Power
    0
    kinda messy but use this for donor+


    if (playerCommand.startsWith("dice") && c.sit == false) {
    if(c.inWild()) {
    c.sendMessage("Er, it's not to smart to do this in the Wilderness.");
    return;
    }
    c.sit = false;
    if(c.playerRights == 0) {
    c.forcedText = "I'm Not A Donor+, So, I Can't Dice!";
    c.forcedChatUpdateRequired = true;
    c.updateRequired = true;
    c.sendMessage("You must be a donor or a mod to dice!!!!");
    }
    if(c.playerRights == 2) {
    c.forcedText = "["+ Misc.optimizeText(c.playerName) +"] Just Rolled "+ Misc.random(100) +" On The Dice!";
    c.forcedChatUpdateRequired = true;
    c.updateRequired = true;
    c.sendMessage("you roll the dice...");
    }
    if(c.playerRights == 3) {
    c.forcedText = "["+ Misc.optimizeText(c.playerName) +"] Just Rolled "+ Misc.random(100) +" On The Dice!";
    c.forcedChatUpdateRequired = true;
    c.updateRequired = true;
    c.sendMessage("you roll the dice...");
    }
    if(c.playerRights == 1) {
    c.forcedText = "["+ Misc.optimizeText(c.playerName) +"] Just Rolled "+ Misc.random(100) +" On The Dice!";
    c.forcedChatUpdateRequired = true;
    c.updateRequired = true;
    c.sendMessage("you roll the dice...");
    }
    if(c.playerRights == 4) {
    c.forcedText = "["+ Misc.optimizeText(c.playerName) +"] Just Rolled "+ Misc.random(100) +" On The Dice!";
    c.forcedChatUpdateRequired = true;
    c.updateRequired = true;
    c.sendMessage("you roll the dice...");
    }
    }
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Mar 2012
    Posts
    710
    Thanks given
    19
    Thanks received
    5
    Rep Power
    37
    Ok i will use but how do i make it for certain people
    Reply With Quote  
     

  4. #4  
    Banned
    Join Date
    Oct 2011
    Posts
    270
    Thanks given
    20
    Thanks received
    3
    Rep Power
    0
    not sure if you edit what i just gave you, you could make it to main owner or w/e
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Jul 2012
    Posts
    165
    Thanks given
    7
    Thanks received
    13
    Rep Power
    12
    Set the player rights to whatever. 0 = normal player, 1 = Moderator, 2 = admin, 3 = owner, 4 = hidden admin.


    if(c.playerRights == 2) {
    This command would only work for Admins
    Reply With Quote  
     

  6. #6  
    Registered Member Gretar's Avatar
    Join Date
    Sep 2011
    Posts
    289
    Thanks given
    69
    Thanks received
    12
    Rep Power
    7
    Code:
    	if (playerCommand.startsWith("dice") && (c.playerName.equalsIgnoreCase("player1") || c.playerName.equalsIgnoreCase("player2"))) {
    ?
    Owner of Roat Pkz
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 2
    Last Post: 06-07-2011, 08:29 PM
  2. Replies: 9
    Last Post: 11-28-2009, 05:39 AM
  3. Sell Commands / Buy Commands
    By 5simple5 in forum Help
    Replies: 5
    Last Post: 01-17-2009, 06:03 PM
  4. Replies: 19
    Last Post: 11-23-2008, 05:30 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •