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 )