-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfiguration.lua
More file actions
36 lines (26 loc) · 802 Bytes
/
Copy pathconfiguration.lua
File metadata and controls
36 lines (26 loc) · 802 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
ONLY_SHOOT_WHILE_AIMING = true
WEAPONS_RECOIL= {
--a fazer
a
}
--jbn
---functions
function cancelShooting ()
if not getPedControlState(localPlayer, "aim_weapon")then
toggleControl("action", false)
toggleControl("fire", false)
else
toggleControl("action", true)
toggleControl("fire", true)
end
end
if ONLY_SHOOT_WHILE_AIMING then
addEventHandler ("onClientKey", root, cancelShooting) --client
addEventHandler ("onClientPlayerWeaponFire", localPlayer, cancelShooting)
end
function isElementMoving(theElement) -- wiki
if isElement(theElement) then -- First check if the given argument is an element
return Vector3(getElementVelocity(theElement)).length ~= 0
end
return false
end