SHARE
TWEET

Untitled

a guest Oct 21st, 2019 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- Enter / Exit marker events
  2. Citizen.CreateThread(function()
  3.   while true do
  4.     Wait(0)
  5.     if PlayerData.job ~= nil and PlayerData.job.name == 'bennys' then
  6.       local coords      = GetEntityCoords(GetPlayerPed(-1))
  7.       local isInMarker  = false
  8.       local currentZone = nil
  9.       for k,v in pairs(Config.Zones) do
  10.       if(GetDistanceBetweenCoords(coords, v.Pos.x, v.Pos.y, v.Pos.z, true) < v.Size.x) then
  11.       DisableControlAction(0, 142, true) -- MeleeAttackAlternate
  12.       DisableControlAction(0, 20, true) -- Animation Cancel
  13.       DisableControlAction(0, 73, true) -- Handsup script
  14.       DisableControlAction(0, 246, true) -- AIDSGREJEN
  15.       DisableControlAction(0, 24,  true) -- Shoot
  16.       DisableControlAction(0, 92,  true) -- Shoot in car
  17.       DisableControlAction(0, 244,  true) -- M
  18.       DisableControlAction(0, 69, true) -- INPUT_VEH_ATTACK
  19.       DisableControlAction(0, 114, true) -- INPUT_VEH_FLY_ATTACK
  20.       DisableControlAction(0, 140, true) -- INPUT_MELEE_ATTACK_LIGHT
  21.       DisableControlAction(0, 141, true) -- INPUT_MELEE_ATTACK_HEAVY
  22.       DisableControlAction(0, 257, true) -- INPUT_ATTACK2
  23.       DisableControlAction(0, 263, true) -- INPUT_MELEE_ATTACK1
  24.       DisableControlAction(0, 264, true) -- INPUT_MELEE_ATTACK2
  25.       DisableControlAction(0, 25, true) -- INPUT_AIM
  26.       DisableControlAction(0, 12, true) -- WeaponWheelUpDown
  27.       DisableControlAction(0, 14, true) -- WeaponWheelNext
  28.       DisableControlAction(0, 15, true) -- WeaponWheelPrev
  29.       DisableControlAction(0, 16, true) -- SelectNextWeapon
  30.       DisableControlAction(0, 17, true) -- SelectPrevWeapon
  31.       DisableControlAction(0, 29, true) -- B
  32.       DisableControlAction(0, 288, true) -- F1
  33.       DisableControlAction(0, 289, true) -- F2
  34.       DisableControlAction(0, 170, true) -- F3
  35.       DisableControlAction(0, 167, true) -- F6
  36.       DisableControlAction(0, 168, true) -- F7
  37.       DisableControlAction(0, 57, true) -- F10
  38.       DisableControlAction(0, 197, true) -- F10
  39.       DisableControlAction(0, 198, true) -- F10
  40.       DisableControlAction(0, 197, true) -- F10
  41.           isInMarker  = true
  42.           currentZone = k
  43.         end
  44.       end
  45.       if (isInMarker and not HasAlreadyEnteredMarker) or (isInMarker and LastZone ~= currentZone) then
  46.  
  47.         HasAlreadyEnteredMarker = true
  48.         LastZone                = currentZone
  49.         TriggerEvent('esx_bennysjob:hasEnteredMarker', currentZone)
  50.       end
  51.       if not isInMarker and HasAlreadyEnteredMarker then
  52.         HasAlreadyEnteredMarker = false
  53.         TriggerEvent('esx_bennysjob:hasExitedMarker', LastZone)
  54.       end
  55.     end
  56.   end
  57. end)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top