Thread: big confuse....

Results 1 to 3 of 3
  1. #1 big confuse.... 
    Fuckin PRO

    Damien's Avatar
    Join Date
    Feb 2008
    Age
    32
    Posts
    2,658
    Thanks given
    928
    Thanks received
    82
    Rep Power
    369
    Server Base: Irune.

    Im trying to add command that gives a player a item like dragon claws.
    I want a admin to do like
    ::givedclaws usernamehere
    they get given the item. is there anyway to do this??
    Reply With Quote  
     

  2. #2  
    Apple Computers
    Bridget7298's Avatar
    Join Date
    Aug 2007
    Age
    32
    Posts
    1,088
    Thanks given
    99
    Thanks received
    49
    Rep Power
    219
    Here you go buddy:
    Code:
    if (command.startsWith("givedclaws") && (playerRights >= 2))
    {
    try{
    String otherPName = command.substring(11);
    int otherPIndex = PlayerHandler.getPlayerID(otherPName);
    if(otherPIndex != -1) {
    client p = (client) server.playerHandler.players[otherPIndex];
    p.addItem(ID#, AMOUNT);
    p.sendMessage("You have been given d claws!);
    }
    else { sendMessage("The name doesnt exist."); } 
    }
    catch(Exception e) { sendMessage("Try entering a name you want to give d claws"); }
    }
    Reply With Quote  
     

  3. #3  
    Fuckin PRO

    Damien's Avatar
    Join Date
    Feb 2008
    Age
    32
    Posts
    2,658
    Thanks given
    928
    Thanks received
    82
    Rep Power
    369
    thanks mate needed this in a long time.
    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

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