Thread: [508]Teleport command right 1 help[508]

Results 1 to 5 of 5
  1. #1 [508]Teleport command right 1 help[508] 
    Registered Member
    Join Date
    Aug 2008
    Posts
    140
    Thanks given
    0
    Thanks received
    0
    Rep Power
    2
    hello,
    i wanted to add a teleport command to my server.
    this is the code:
    Code:
      if (cmd[0].equals("adminzone")) {
    				        p.getActionSender().sendMessage(p, "<img=1>Welcome to Godscape's Mod/Admin/Owner Hideout<img=1>.");
    				        p.teleportTo(3165 + Misc.random(2), 9628 + Misc.random(2), 0, 4, 0, 8939, 8941, 1576, 0, 1577, 0);
                                            p.requestGFX(1618, 0);
                                    }
    How do i make it work only for admins and moderators.
    Reply With Quote  
     

  2. #2  
    ★☆♥♣♥☆★

    EndlessZombies's Avatar
    Join Date
    Aug 2008
    Age
    31
    Posts
    440
    Thanks given
    30
    Thanks received
    4
    Rep Power
    125
    Code:
      if (cmd[0].equals("adminzone") && p.rights >= 1) {
    				        p.getActionSender().sendMessage(p, "<img=1>Welcome to Godscape's Mod/Admin/Owner Hideout<img=1>.");
    				        p.teleportTo(3165 + Misc.random(2), 9628 + Misc.random(2), 0, 4, 0, 8939, 8941, 1576, 0, 1577, 0);
                                            p.requestGFX(1618, 0);
                                    }

    "Snapback with my city on it, text back with yo titties on it, levi's with yo kitty on it"


    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Aug 2008
    Posts
    140
    Thanks given
    0
    Thanks received
    0
    Rep Power
    2
    thanx worked.
    Reply With Quote  
     

  4. #4  
    Donator

    iZAjz's Avatar
    Join Date
    Mar 2007
    Age
    29
    Posts
    3,675
    Thanks given
    105
    Thanks received
    47
    Rep Power
    1882
    Quote Originally Posted by Domanico View Post
    Code:
      if (cmd[0].equals("adminzone") && p.rights >= 1) {
    				        p.getActionSender().sendMessage(p, "<img=1>Welcome to Godscape's Mod/Admin/Owner Hideout<img=1>.");
    				        p.teleportTo(3165 + Misc.random(2), 9628 + Misc.random(2), 0, 4, 0, 8939, 8941, 1576, 0, 1577, 0);
                                            p.requestGFX(1618, 0);
                                    }
    Or you can just place it under p.rights >= 1...
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Jun 2010
    Posts
    24
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    Quote Originally Posted by Domanico View Post
    Code:
      if (cmd[0].equals("adminzone") && p.rights >= 1) {
    				        p.getActionSender().sendMessage(p, "<img=1>Welcome to Godscape's Mod/Admin/Owner Hideout<img=1>.");
    				        p.teleportTo(3165 + Misc.random(2), 9628 + Misc.random(2), 0, 4, 0, 8939, 8941, 1576, 0, 1577, 0);
                                            p.requestGFX(1618, 0);
                                    }
    What does Misc.random(2) mean and why is there more then 3 coordinates (There's usually only 3{x,y,z}) and also what does requestGFX(1618,0); mean?
    Please someone explain it to me! Sorry if this was already posted!

    P.S. Why instead of "player" we're using "p"? Where do you set it up?
    Thanks in advance!

    EDIT: I understand this now. ;P
    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
  •