Jump to content

Is Player in ColCircle


MasterTobi

Recommended Posts

hey

my prob is:

  
function Jobjoin(client) 
if (client) then  
if (getElementPosition(client) == getElementPosition(createColCircle (1647.2434,-1815.3563,10)) )then 
outputChatBox ("ok",client ) 
end 
end 
end 
addCommandHandler ( "enter", Jobjoin) 
  

when i in the circle and type /enter then they dont outputChatBox ("ok",client )

Link to comment

Your function needs to have command name argument. And it's still impossible to make that message appear: player must be in the exact center of circle because it checks position. It's better to create a colshape outside function and then use IsElementWithinColShape in this function.

Link to comment

It also seems to be creating new colcircles everytime it's executed.

colshape=createColCircle (1647.2434,-1815.3563,10) 
  
function Jobjoin(client) 
    if (client) then  
        if (isElementWithinColShape(client,colshape))then 
            outputChatBox ("ok",client ) 
        end 
    end 
end 
addCommandHandler ( "enter", Jobjoin) 

For example. This should work. ;)

Link to comment

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...