Jump to content

Green zones Protecte


Recommended Posts

Server side:

local GreenZone = createColRectangle (-711,957,255,255)  
    local Radar = createRadarArea (-711,957,255,255,50, 150, 50, 155)  
  
function zoneEnter ( thePlayer, matchingDimension ) 
      if matchingDimension and isElement(thePlayer) and getElementType(thePlayer) == "player" then 
         toggleControl ( thePlayer, "fire", false ) 
         toggleControl ( thePlayer, "next_weapon", false ) 
         toggleControl ( thePlayer, "previous_weapon", false ) 
          outputChatBox( "You've entered to the greenzone.",thePlayer, 255,0,0) 
      end 
  
    end 
    addEventHandler ( "onColShapeHit", GreenZone, zoneEnter ) 
      
function zoneExit ( thePlayer, matchingDimension ) 
        if matchingDimension and isElement(thePlayer) and getElementType(thePlayer) == "player" then 
         toggleControl ( thePlayer, "fire", true ) 
         toggleControl ( thePlayer, "next_weapon", true ) 
         toggleControl ( thePlayer, "previous_weapon", true ) 
       outputChatBox ( "You've left the greenzone,now all your ammos will works.",thePlayer,255,0,0) 
        end 
    end 
    addEventHandler ( "onColShapeLeave", GreenZone,zoneExit ) 

Link to comment
  • 2 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...