Advertisement
Guest User

Untitled

a guest
Nov 17th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.09 KB | None | 0 0
  1. local Keys = {
  2. ["ESC"] = 322, ["F1"] = 288, ["F2"] = 289, ["F3"] = 170, ["F5"] = 166, ["F6"] = 167, ["F7"] = 168, ["F8"] = 169, ["F9"] = 56, ["F10"] = 57,
  3. ["~"] = 243, ["1"] = 157, ["2"] = 158, ["3"] = 160, ["4"] = 164, ["5"] = 165, ["6"] = 159, ["7"] = 161, ["8"] = 162, ["9"] = 163, ["-"] = 84, ["="] = 83, ["BACKSPACE"] = 177,
  4. ["TAB"] = 37, ["Q"] = 44, ["W"] = 32, ["E"] = 38, ["R"] = 45, ["T"] = 245, ["Y"] = 246, ["U"] = 303, ["P"] = 199, ["["] = 39, ["]"] = 40, ["ENTER"] = 18,
  5. ["CAPS"] = 137, ["A"] = 34, ["S"] = 8, ["D"] = 9, ["F"] = 23, ["G"] = 47, ["H"] = 74, ["K"] = 311, ["L"] = 182,
  6. ["LEFTSHIFT"] = 21, ["Z"] = 20, ["X"] = 73, ["C"] = 26, ["V"] = 0, ["B"] = 29, ["N"] = 249, ["M"] = 244, [","] = 82, ["."] = 81,
  7. ["LEFTCTRL"] = 36, ["LEFTALT"] = 19, ["SPACE"] = 22, ["RIGHTCTRL"] = 70,
  8. ["HOME"] = 213, ["PAGEUP"] = 10, ["PAGEDOWN"] = 11, ["DELETE"] = 178,
  9. ["LEFT"] = 174, ["RIGHT"] = 175, ["TOP"] = 27, ["DOWN"] = 173,
  10. ["NENTER"] = 201, ["N4"] = 108, ["N5"] = 60, ["N6"] = 107, ["N+"] = 96, ["N-"] = 97, ["N7"] = 117, ["N8"] = 61, ["N9"] = 118
  11. }
  12.  
  13. ESX = nil
  14.  
  15. Citizen.CreateThread(function()
  16. while ESX == nil do
  17. TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
  18. Citizen.Wait(0)
  19. end
  20. end)
  21.  
  22.  
  23. function OpenIdmenu()
  24.  
  25. local elements = {
  26. {label = 'צפה בתעודת הזהות שלך', value = 'selfid'},
  27. {label = 'הראה את תעודת הזהות שלך למי שמולך', value = 'showid'},
  28. {label = 'צפה ברישיו נהיגה שלך', value = 'selflic'},
  29. {label = 'הראה את רישיון הנהיגה שלך למי שעומד מולך', value = 'showlic'},
  30. {label = 'צפה ברישיון הנשק שלך', value = 'selfwea'},
  31. {label = 'הראה את רישיון הנשק שלך למי שעומד מולך', value = 'showwea'}
  32. }
  33.  
  34.  
  35. ESX.UI.Menu.Open(
  36. 'default', GetCurrentResourceName(), 'bolbol',
  37. {
  38. title = 'תפרטי זהות',
  39. align = 'bottom-right',
  40. elements = elements
  41. },
  42. function(data, menu)
  43. if data.current.value == 'selfid' then
  44. TriggerServerEvent('jsfour-idcard:open', GetPlayerServerId(PlayerId()), GetPlayerServerId(PlayerId()))
  45. --TriggerServerEvent('jsfour-idcard:open', GetPlayerServerId(PlayerId()), GetPlayerServerId(PlayerId()), 'weapon')
  46.  
  47. -- TriggerEvent('homo:handcaff')
  48. elseif data.current.value == 'showid' then
  49. --
  50. local player, distance = ESX.Game.GetClosestPlayer()
  51.  
  52. if distance ~= -1 and distance <= 3.0 then
  53. TriggerServerEvent('jsfour-idcard:open', GetPlayerServerId(PlayerId()), GetPlayerServerId(player))
  54. animgive()
  55. else
  56. ESX.ShowNotification('No players nearby')
  57. end
  58.  
  59. --
  60.  
  61. elseif data.current.value == 'selflic' then
  62. TriggerServerEvent('jsfour-idcard:open', GetPlayerServerId(PlayerId()), GetPlayerServerId(PlayerId()), 'driver')
  63.  
  64. elseif data.current.value == 'showlic' then
  65. ---
  66. local player, distance = ESX.Game.GetClosestPlayer()
  67.  
  68. if distance ~= -1 and distance <= 3.0 then
  69. TriggerServerEvent('jsfour-idcard:open', GetPlayerServerId(PlayerId()), GetPlayerServerId(player), 'driver')
  70. animgive()
  71. else
  72. ESX.ShowNotification('No players nearby')
  73. end
  74. ---
  75. elseif data.current.value == 'selfwea' then
  76. TriggerServerEvent('jsfour-idcard:open', GetPlayerServerId(PlayerId()), GetPlayerServerId(PlayerId()), 'weapon')
  77. elseif data.current.value == 'showwea' then
  78. ---
  79. local player, distance = ESX.Game.GetClosestPlayer()
  80.  
  81. if distance ~= -1 and distance <= 3.0 then
  82. TriggerServerEvent('jsfour-idcard:open', GetPlayerServerId(PlayerId()), GetPlayerServerId(player), 'weapon')
  83. animgive()
  84. else
  85. ESX.ShowNotification('No players nearby')
  86. end
  87. end
  88. end,function(data, menu)
  89. menu.close()
  90. end
  91. )
  92.  
  93.  
  94. end
  95.  
  96. function animgive()
  97.  
  98. local playerPed = PlayerPedId()
  99. --local coords = GetEntityCoords(playerPed)
  100. --local bone = GetPedBoneIndex(playerPed, 28422)
  101. --local phoneModel = 'prop_npc_phone_02'
  102.  
  103. Citizen.CreateThread(function()
  104. RequestAnimDict('oddjobs@taxi@cyi')
  105. while not HasAnimDictLoaded('oddjobs@taxi@cyi') do
  106. Citizen.Wait(0)
  107. end
  108.  
  109. TaskPlayAnim(playerPed, 'oddjobs@taxi@cyi', 'std_hand_off_ps_passenger', 1.0, -1, -1, 50, 0, false, false, false)
  110.  
  111. Citizen.Wait(2000)
  112. ClearPedTasks(playerPed)
  113.  
  114. end)
  115.  
  116. end
  117.  
  118. -- Key Controls
  119. Citizen.CreateThread(function()
  120. while true do
  121. Citizen.Wait(0)
  122.  
  123. if IsControlJustReleased(0, Keys['F9']) then
  124. OpenIdmenu()
  125. end
  126.  
  127.  
  128. end
  129. end)
  130.  
  131. Citizen.CreateThread(function()
  132.  
  133. while true do
  134. Citizen.Wait(2)
  135. -- List of pickup hashes (https://pastebin.com/8EuSv2r1)
  136. RemoveAllPickupsOfType(0xDF711959) -- carbine rifle
  137. RemoveAllPickupsOfType(0xF9AFB48F) -- pistol
  138. RemoveAllPickupsOfType(0xA9355DCD) -- pumpshotgun
  139. RemoveAllPickupsOfType(0x1A88742D) -- HEAVYSNIPER
  140. RemoveAllPickupsOfType(0x1A88742D) -- HEAVYSNIPER
  141. RemoveAllPickupsOfType(0x98C74B66) -- sniperRifel
  142. end
  143.  
  144. end)
  145.  
  146. Citizen.CreateThread(function()
  147. while true do
  148. Citizen.Wait(1)
  149. id = PlayerId()
  150. DisablePlayerVehicleRewards(id)
  151. end
  152. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement