alcholistu Posted April 7, 2013 Share 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 ) Link to comment
golanu21 Posted April 7, 2013 Share Posted April 7, 2013 you need to create teams for that Link to comment
alcholistu Posted April 7, 2013 Author Share Posted April 7, 2013 (edited) Okey Edited April 7, 2013 by Guest Link to comment
Jaysds1 Posted April 7, 2013 Share Posted April 7, 2013 actually, you could use getElementsWithinColShape to get everyone that's in the colshape/radar area. 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