Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local hillArea = createColRectangle ( -374.513671875,-573.9697265625, 550, 550 )
- local hillRadar = createRadarArea ( -374.513671875,-573.9697265625, 550, 550, 0, 255, 0, 175 )
- function hill_Enter ( thePlayer, matchingDimension )
- if (getElementType(thePlayer) == "player") then
- outputChatBox( "Wchodzisz do bezpiecznej strefy!", thePlayer, 255, 255, 109 )
- toggleControl (thePlayer, "aim_weapon", false)
- setElementData(thePlayer, "greenzone", "TAK" )
- end
- end
- addEventHandler ( "onColShapeHit", hillArea, hill_Enter )
- function hill_Exit ( thePlayer, matchingDimension )
- if (getElementType(thePlayer) == "player") then
- outputChatBox ( "Wychodzisz z bezpiecznej strefy!", thePlayer, 255, 255, 109 )
- toggleControl (thePlayer, "aim_weapon", true)
- setElementData(thePlayer, "greenzone", "NIE" )
- setElementData(thePlayer, "blood", 12000 )
- end
- end
- addEventHandler ( "onColShapeLeave", hillArea, hill_Exit )
- function sprawdz()
- local allPlayers = getElementsByType("player")
- for index,value in ipairs(allPlayers) do
- if getElementData(value, "greenzone") == "TAK" then
- setElementData(value, "blood", 999999 )
- setElementData(value, "bleeding", 0)
- setElementData(value, "brokenbone", false)
- setElementData(value, "pain", false)
- setElementData(value, "greenzone", "TAK" )
- if isPlayerInVehicle ( value ) then
- local veh = getPedOccupiedVehicle(value)
- fixVehicle ( veh )
- end
- else
- setElementData(value, "greenzone", "NIE" )
- end
- end
- end
- function onResourceStart(thisResource)
- setTimer ( sprawdz, 250, 0 )
- end
- addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), onResourceStart )
Advertisement
Add Comment
Please, Sign In to add comment