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 )
golanu21 Posted April 7, 2013 Posted April 7, 2013 you need to create teams for that [Dev]BloWnRPG - We BloW the World [1%]
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. My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
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