Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Enter / Exit marker events
- Citizen.CreateThread(function()
- while true do
- Wait(0)
- if PlayerData.job ~= nil and PlayerData.job.name == 'bennys' then
- local coords = GetEntityCoords(GetPlayerPed(-1))
- local isInMarker = false
- local currentZone = nil
- for k,v in pairs(Config.Zones) do
- if(GetDistanceBetweenCoords(coords, v.Pos.x, v.Pos.y, v.Pos.z, true) < v.Size.x) then
- DisableControlAction(0, 142, true) -- MeleeAttackAlternate
- DisableControlAction(0, 20, true) -- Animation Cancel
- DisableControlAction(0, 73, true) -- Handsup script
- DisableControlAction(0, 246, true) -- AIDSGREJEN
- DisableControlAction(0, 24, true) -- Shoot
- DisableControlAction(0, 92, true) -- Shoot in car
- DisableControlAction(0, 244, true) -- M
- DisableControlAction(0, 69, true) -- INPUT_VEH_ATTACK
- DisableControlAction(0, 114, true) -- INPUT_VEH_FLY_ATTACK
- DisableControlAction(0, 140, true) -- INPUT_MELEE_ATTACK_LIGHT
- DisableControlAction(0, 141, true) -- INPUT_MELEE_ATTACK_HEAVY
- DisableControlAction(0, 257, true) -- INPUT_ATTACK2
- DisableControlAction(0, 263, true) -- INPUT_MELEE_ATTACK1
- DisableControlAction(0, 264, true) -- INPUT_MELEE_ATTACK2
- DisableControlAction(0, 25, true) -- INPUT_AIM
- DisableControlAction(0, 12, true) -- WeaponWheelUpDown
- DisableControlAction(0, 14, true) -- WeaponWheelNext
- DisableControlAction(0, 15, true) -- WeaponWheelPrev
- DisableControlAction(0, 16, true) -- SelectNextWeapon
- DisableControlAction(0, 17, true) -- SelectPrevWeapon
- DisableControlAction(0, 29, true) -- B
- DisableControlAction(0, 288, true) -- F1
- DisableControlAction(0, 289, true) -- F2
- DisableControlAction(0, 170, true) -- F3
- DisableControlAction(0, 167, true) -- F6
- DisableControlAction(0, 168, true) -- F7
- DisableControlAction(0, 57, true) -- F10
- DisableControlAction(0, 197, true) -- F10
- DisableControlAction(0, 198, true) -- F10
- DisableControlAction(0, 197, true) -- F10
- isInMarker = true
- currentZone = k
- end
- end
- if (isInMarker and not HasAlreadyEnteredMarker) or (isInMarker and LastZone ~= currentZone) then
- HasAlreadyEnteredMarker = true
- LastZone = currentZone
- TriggerEvent('esx_bennysjob:hasEnteredMarker', currentZone)
- end
- if not isInMarker and HasAlreadyEnteredMarker then
- HasAlreadyEnteredMarker = false
- TriggerEvent('esx_bennysjob:hasExitedMarker', LastZone)
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement