Thread: [PI] Saving coordinates on command

Results 1 to 4 of 4
  1. #1 [PI] Saving coordinates on command 
    Registered Member Harambe_'s Avatar
    Join Date
    Jul 2007
    Posts
    504
    Thanks given
    15
    Thanks received
    22
    Rep Power
    13
    I want to make a command like "sethome" so when a player does that it will save the coordinates and when they click on the home teletab it will bring them to that spot. But i don't know to make a command to save the coordinates like that.
    Reply With Quote  
     

  2. #2  
    Banned

    Join Date
    Mar 2011
    Posts
    4,062
    Thanks given
    194
    Thanks received
    689
    Rep Power
    0
    just make like an int for player coords, like public int X; and public int Y; , make a command sethome and then under it put c.X = c.absX and be sure to put it in playersave
    Reply With Quote  
     

  3. #3  
    Super Donator

    Jack Daniels's Avatar
    Join Date
    Oct 2010
    Posts
    1,842
    Thanks given
    787
    Thanks received
    507
    Rep Power
    412
    if(playerCommand.startsWith("sethome")){
    int x = substring blah
    int y = substring blah
    player.sethome(x,y);
    }


    public void sethome(x,y){
    this.homeX = x;
    this.homeY = y;
    }


    then in the saving classes u just save that and when u click on actionbutton of home tele it does

    teleport(player.homeX,player.homeY);


    mad?


    New Skype : samar.server
    Reply With Quote  
     

  4. #4  
    Registered Member Harambe_'s Avatar
    Join Date
    Jul 2007
    Posts
    504
    Thanks given
    15
    Thanks received
    22
    Rep Power
    13
    Thanks for the help but i got it on my own >.> , like always i ask for help then figure it out 2 minutes after lol
    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. npc ids| coordinates and much more!!
    By marciano in forum Configuration
    Replies: 22
    Last Post: 08-14-2012, 08:59 PM
  2. [pi]adding a timer to command + saving it
    By Ninja assassin in forum Help
    Replies: 0
    Last Post: 09-21-2010, 11:33 PM
  3. AddNPC Command+Saving. Simple But useful.
    By BamBam in forum Snippets
    Replies: 12
    Last Post: 01-31-2010, 06:26 AM
  4. [REQ] Coordinates! [REQ]
    By Mr. Rave in forum Requests
    Replies: 3
    Last Post: 05-18-2009, 05:08 PM
  5. Cool Saving Command!
    By I Zel I in forum Configuration
    Replies: 7
    Last Post: 07-11-2008, 08:26 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
  •