![]() |
scripting question
hey, im making a spar complex system where when you enter the level, or say /spar, a gui comes up that says "Do you want to spar?" and there is a "yes" and "no" button. If you say yes, it warps you into the middle of the spar, and if you say no, it closes the gui. My question is, how can I make the script check if there is already 2 players in the spar? like in a certain x,y? How can I make them check for 2 players in that x,y? Right now, people just come in, while others are sparring. THanks, Jamerson
|
Personally, I would just loop through all the players in the level, and if the player's x and y are inside the sparring part of the level, you increment a variable. If the value of the variable reaches two, break out of the loop (since it's not needed anymore). Then you know that there's two people inside.
|
Quote:
This. Also, to check if the player is in a certain part of the level in the loop, you would use: PHP Code:
|
| All times are GMT +2. The time now is 04:06 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.