Hello guys,im trying to make an DM system that if a player entred the ColShape he get message "You have entered the DM area" and if he left it he'll have an message with you have left the DM area, i made an code about that but it doesn't working
Here's my code: when i hit the dm zone i dont get anymessage please try to help me out of it
local hillArea = createColRectangle ( -2171.0678710938, 678.17950439453, 15, 15 )
local hillRadar = createRadarArea ( -2183.5678710938, 705.67950439453, 40, -40, 0, 255, 0, 0 ) -- i want to set it invisible
function hill_Enter ( thePlayer, matchingDimension )
if (getElementType(thePlayer) == "player") then
outputChatBox( "DM system: You have entered the DM Area.", getRootElement(), 255, 255, 109 )
end
end
addEventHandler ( "onColShapeHit", hillArea, hill_Enter )
function hill_Exit ( thePlayer, matchingDimension )
if (getElementType(thePlayer) == "player") then
if isPedDead ( thePlayer ) ~= true then
outputChatBox ( "DM system:You have left the DM Area.", getRootElement(), 255, 255, 109 )
end
end
end
addEventHandler ( "onColShapeLeave", hillArea, hill_Exit )