Antoni Posted September 16, 2013 Share Posted September 16, 2013 Hi, I have wondered for a while how you use coordinates to create things like chat limits, and zones where certain commands work. For example, a chat limit on a roleplay server where only people in a certain range can see the speech text, or the /me. And also certain areas where commands will work. Like on some TDM servers you spawn and must be stood close to your spawnpoint (but not exactly on it) to do a command like /class and change your weapons. Link to comment
EstrategiaGTA Posted September 16, 2013 Share Posted September 16, 2013 Do you mean doing X thing only if you are near to a position? You can use createColRectangle removeCommandHandler addCommandHandler And the events would be onColShapeHit and onColShapeLeave if it is server-side or for client-side, onClientColShapeHit and onClientColShapeLeave So you would remove the command when you leave the Colshape and you would create it when you enter it. Link to comment
Techial Posted September 18, 2013 Share Posted September 18, 2013 You could try looping through all the players. Get the distance between you and them, and if it's inside your parameters it would outputChatBox to them (server-side) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now