Thread: PI Let server know if left area

Results 1 to 2 of 2
  1. #1 PI Let server know if left area 
    Donator

    Join Date
    Jun 2012
    Posts
    637
    Thanks given
    129
    Thanks received
    87
    Rep Power
    57
    How do i let the server know if a player has left a area, example in a custom minigame when a player gets force teleported it would stop the minigame
    Reply With Quote  
     

  2. #2  
    Donator


    Join Date
    Jun 2011
    Posts
    2,549
    Thanks given
    539
    Thanks received
    402
    Rep Power
    683
    Declare the boundaries of the minigame, player class

    Code:
    public boolean MinigameArea() {
    	if (heightLevel == 2 || heightLevel == 0 || heightLevel == 1) {
    	if (absX >= #### && absX <= #### && absY >= #### && absY <= ####) {
    			return true;
    		}
    	}
    	return false;
    }
    Use the boundaries, client class

    Code:
    if (MinigameArea()) {
    	  minigame.InitializeGame;	
    		} else if (!MinigameArea()) {
              minigame.StopGame;
    }
    And you'd need to import your minigames package, etc

    Something like that should work
    All the best,
    Nirvana

    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. [PI]Ignore blocked messages if from server
    By Larabeast in forum Help
    Replies: 1
    Last Post: 07-07-2011, 02:30 AM
  2. Replies: 6
    Last Post: 04-25-2011, 11:50 PM
  3. Replies: 0
    Last Post: 10-16-2010, 03:24 PM
  4. Replies: 2
    Last Post: 08-15-2010, 04:25 PM
  5. Replies: 23
    Last Post: 01-17-2008, 01:23 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
  •