Black2 Posted August 1, 2015 Share Posted August 1, 2015 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
GTX Posted August 1, 2015 Share Posted August 1, 2015 If you only want to restrict one command, use isElementWithinColShape Link to comment
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