Sign in to follow this  
Antoni

Chat limits and coordinates

Recommended Posts

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.

Share this post


Link to post

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.

Share this post


Link to post

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)

Share this post


Link to post

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.