murilo2929 Posted October 6, 2019 Share Posted October 6, 2019 I am trying to make sure that when a player is not in isElementWithinColShape a message appears stating that it is not in the right place but not working how can I do it? local mechanic = isElementWithinColShape( localPlayer, mecanico ) if not mechanic then outputChatBox("TEST", 255, 0, 0) this is just part of the code saying how I did it, I already set where is the sphere and everything Link to comment
VenomOG Posted October 6, 2019 Share Posted October 6, 2019 (edited) 5 hours ago, murilo2929 said: I am trying to make sure that when a player is not in isElementWithinColShape a message appears stating that it is not in the right place but not working how can I do it? local mechanic = isElementWithinColShape( localPlayer, mecanico ) if not mechanic then outputChatBox("TEST", 255, 0, 0) this is just part of the code saying how I did it, I already set where is the sphere and everything local col = createColRectangle ( X, Y, 15, 15 ) addEventHandler("onColShapeHit",col,function(hitElement,MD) outputChatBox("Your now im the zone mayneeeeeeeeeeeeeeeeeeeeeeeeeee",hitElement, 255, 0, 0) end) addEventHandler ( "onColShapeLeave", col, function(thePlayer) if isElementWithinColShape( thePlayer, col ) then outputChatBox("Your not im the zone mayneeeeeeeeeeeeeeeeeeeeeeeeeee",thePlayer, 255, 0, 0) end end) This should work Edited October 6, 2019 by Network Fixed something Link to comment
murilo2929 Posted October 7, 2019 Author Share Posted October 7, 2019 14 hours ago, Network said: local col = createColRectangle ( X, Y, 15, 15 ) addEventHandler("onColShapeHit",col,function(hitElement,MD) outputChatBox("Your now im the zone mayneeeeeeeeeeeeeeeeeeeeeeeeeee",hitElement, 255, 0, 0) end) addEventHandler ( "onColShapeLeave", col, function(thePlayer) if isElementWithinColShape( thePlayer, col ) then outputChatBox("Your not im the zone mayneeeeeeeeeeeeeeeeeeeeeeeeeee",thePlayer, 255, 0, 0) end end) This should work don't work dude Link to comment
Overkillz Posted October 7, 2019 Share Posted October 7, 2019 2 hours ago, murilo2929 said: don't work dude Network has sent you a code that is server side. Be aware of that. Otherwise, with a simple comment which says "doesn't work" we can not do anything. You could bring more info about the issue like the debug messages or whatever. Regards. 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