alcholistu Posted April 7, 2013 Posted April 7, 2013 Okey , i created a territory and i want : When someone gets on territory to show on family chat... That's the script : local hillArea = createColRectangle ( 647.73248291016, -1309.841796875, 140, 167 ) local hillRadar = createRadarArea ( 647.73248291016, -1309.841796875, 140, 167, 255, 255, 0, 175 ) function hill_Enter ( thePlayer, matchingDimension ) if (getElementType(thePlayer) == "player") then outputChatBox( getPlayerName(thePlayer) .. "entered Sureno's territory!", getRootElement(), 255, 255, 0 ) setRadarAreaFlashing ( hillRadar, true ) end end addEventHandler ( "onColShapeHit", hillArea, hill_Enter ) function hill_Exit ( thePlayer, matchingDimension ) if (getElementType(thePlayer) == "player") then if isPedDead ( thePlayer ) ~= true then outputChatBox ( getPlayerName(thePlayer) .. " isn't anymore on territory!", getRootElement(), 255, 255, 0 ) setRadarAreaFlashing ( hillRadar, false ) end end end addEventHandler ( "onColShapeLeave", hillArea, hill_Exit )
alcholistu Posted April 7, 2013 Author Posted April 7, 2013 (edited) Okey Edited April 7, 2013 by Guest
Jaysds1 Posted April 7, 2013 Posted April 7, 2013 actually, you could use getElementsWithinColShape to get everyone that's in the colshape/radar area.
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