MasterTobi Posted December 24, 2009 Share Posted December 24, 2009 hey @ all if have a Problem with createRadarArea i created an Area like LS =createRadarArea (-905.5929,-2933.0986,4000,3500,255,255,255,100,source) if I am in the area and type my Command /test then I get the expenditure "no" LS =createRadarArea (-905.5929,-2933.0986,4000,3500,255,255,255,100,source) function Zonen(source) local posX, posY,posz = getElementPosition(source) if (isInsideRadarArea(LS,posX, posY )) then outputChatBox("jo") else outputChatBox("nö") end end addCommandHandler("test",Zonen) if i press F11 to see the Map, i see the Area over LS and I am in the AREA i need help, can somebody help me sry for my bad english Link to comment
subenji99 Posted December 24, 2009 Share Posted December 24, 2009 isInsideRadarArea() does not work correctly on the server. Read: https://wiki.multitheftauto.com/wiki/IsInsideRadarArea Link to comment
robhol Posted December 24, 2009 Share Posted December 24, 2009 1) Reading your code like that is a nightmare. Use [code=lua], space out your code a bit, and indent it properly. 2) As subenji said, that function doesn't really work on the server. However, you can just check the player's coordinates related to the radar area's in your own function, or you can create a colshape (colrectangle, in this case) in parallel with the radar area, and see if the player is within THAT. 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