Jump to content

[HELP]Command Only In rectangle


Black2

Recommended Posts

I want to use the command only in rectangle.

When the player enters the rectangle it can use the command and when he gets out he can not use more.

Here's an example that might work will be?,If it works What do I should use for this? Thx

addEventHandler ("onColShapeHit", getRootElement(),  
function(hitElement, matchingDimension) 
  if (getElementType (hitElement) == "player") and (getElementID (source) == "greenzoneColshape") then 
    toggleControl (hitElement, "fire", false) 
    toggleControl (hitElement, "aim_weapon", false) 
    toggleControl (hitElement, "vehicle_fire", false) 
    triggerClientEvent (hitElement, "enableGodMode", hitElement) 
  end 
end) 

Link to comment

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...