xXMADEXx Posted December 8, 2012 Posted December 8, 2012 How can i make it so when someone enters the these ColShapes they have godmode, and godmode disables when the exit? -- Hosp By LSPD local hillArea1 = createColRectangle ( 1150.15234375,-1393.5898437, 100, 100 ) local radar1 = createRadarArea ( 1150.15234375,-1393.5898437, 100, 100, 0, 255, 0, 200 ) function hill_Enter ( thePlayer, matchingDimension ) local playerX, playerY, playerZ = getElementPosition ( thePlayer ) local playerZoneName = getZoneName ( playerX, playerY, playerZ ) if (getElementType(thePlayer) == "player") then outputChatBox( "You have entered the ".. playerZoneName .." Safe Zone!", thePlayer, 0, 255, 0 ) setRadarAreaFlashing ( radar1, false ) end end addEventHandler ( "onColShapeHit", hillArea1, hill_Enter ) function hill_Exit ( thePlayer, matchingDimension ) local playerX, playerY, playerZ = getElementPosition ( thePlayer ) local playerZoneName = getZoneName ( playerX, playerY, playerZ ) if (getElementType(thePlayer) == "player") then if isPedDead ( thePlayer ) ~= true then outputChatBox( "You have left the ".. playerZoneName .." Safe Zone!", thePlayer, 255, 0, 0 ) setRadarAreaFlashing ( radar1, false ) end end end addEventHandler ( "onColShapeLeave", hillArea1, hill_Exit ) -- Hosp By CJ's House local hillArea2 = createColRectangle ( 1996.712890625,-1451.391601562, 110, 100 ) local radar2 = createRadarArea ( 1991.812890625,-1456.391601562, 110, 100, 0, 255, 0, 200 ) function hill_Enter_1 ( thePlayer, matchingDimension ) local playerX, playerY, playerZ = getElementPosition ( thePlayer ) local playerZoneName = getZoneName ( playerX, playerY, playerZ ) if (getElementType(thePlayer) == "player") then outputChatBox( "You have entered the ".. playerZoneName .." Safe Zone!", thePlayer, 0, 255, 0 ) setRadarAreaFlashing ( radar2, false ) end end addEventHandler ( "onColShapeHit", hillArea2, hill_Enter_1 ) function hill_exit_1 ( thePlayer, matchingDimension ) local playerX, playerY, playerZ = getElementPosition ( thePlayer ) local playerZoneName = getZoneName ( playerX, playerY, playerZ ) if (getElementType(thePlayer) == "player") then if isPedDead ( thePlayer ) ~= true then outputChatBox( "You have left the ".. playerZoneName .." Safe Zone!", thePlayer, 255, 0, 0 ) setRadarAreaFlashing ( radar2, false ) end end end addEventHandler ( "onColShapeLeave", hillArea2, hill_exit_1 )
Castillo Posted December 8, 2012 Posted December 8, 2012 triggerClientEvent onClientPlayerDamage cancelEvent
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