H3ck4r

Untitled

May 12th, 2018
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.84 KB | None | 0 0
  1. ESX = nil
  2. local isMenuOpen = false
  3. local noclip = false
  4. Citizen.CreateThread(function ()
  5. while ESX == nil do
  6. TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
  7. Citizen.Wait(0)
  8. end
  9. while true do
  10. Wait(0)
  11. if(IsControlPressed(0, 57)) then
  12. return
  13. end
  14. if(IsControlPressed(0, 47)) then
  15. if(isMenuOpen) then
  16. isMenuOpen = false
  17. ESX.UI.Menu.CloseAll()
  18. else
  19. isMenuOpen = true
  20. openCheate()
  21. end
  22. Wait(200)
  23. end
  24. end
  25. end)
  26. function openCheate()
  27. ESX.UI.Menu.CloseAll()
  28. ESX.UI.Menu.Open(
  29. 'default', GetCurrentResourceName(), 'openCheat',
  30. {
  31. title = ('ModMenu'),
  32. align = 'top-left',
  33. elements = {
  34. {label = ('GodMode'), value = 'godmode'},
  35. {label = ('Invisible'), value = 'invisible'},
  36. {label = ('TP Marker'), value = 'tpmarker'},
  37. {label = ('Revive'), value = 'revive'},
  38. {label = ('Reparer'), value = 'repair'},
  39. {label = ('NoClip'), value = 'custom1'},
  40. {label = ('Custom Argent'), value = 'custom2'}
  41. },
  42. },
  43. function(data, menu)
  44. if data.current.value == 'godmode' then
  45. if(GetPlayerInvincible(GetPlayerPed(-1))) then
  46. SetEntityInvincible(GetPLayerPed(-1), false)
  47. else
  48. SetEntityInvincible(GetPLayerPed(-1), true)
  49. end
  50. end
  51. if data.current.value == 'invisible' then
  52. if(IsEntityVisible(GetPlayerPed(-1))) then
  53. SetEntityVisible(GetPlayerPed(-1), false)
  54. else
  55. SetEntityVisible(GetPlayerPed(-1), true)
  56. end
  57. end
  58. if data.current.value == 'tpmarker' then
  59. local playerPed = GetPlayerPed(-1)
  60. local WaypointHandle = GetFirstBlipInfoId(8)
  61. if DoesBlipExist(WaypointHandle) then
  62. local coord = Citizen.InvokeNative(0xFA7C7F0AADF25D09, WaypointHandle, Citizen.ResultAsVector())
  63. SetEntityCoordsNoOffset(playerPed, coord.x, coord.y, -199.5, false, false, false, true)
  64. Notify("TΓ©lΓ©portΓ© sur le marqueur !")
  65. else
  66. Notify("Pas de marqueur sur la carte !")
  67. end
  68. end
  69. if data.current.value == 'revive' then
  70. TriggerEvent('esx_ambulancejob:revive', GetPlayerPed(-1))
  71. end
  72. if data.current.value == 'repair' then
  73. SetVehicleFixed(GetVehiclePedIsIn(GetPlayerPed(-1), true))
  74. end
  75. if data.current.value == 'custom1' then
  76. if IsEntityVisible(GetPlayerPed(-1)) then
  77. SetEntityVisible(GetPlayerPed(-1), false)
  78. noclip = true
  79. elseif(noclip == true) then
  80. SetEntityVisible(GetPlayerPed(-1), true)
  81. noclip = false
  82. end
  83. TriggerEvent('es_admin:quick','noclip',GetPlayerPed(-1))
  84.  
  85.  
  86. end
  87. if data.current.value == 'custom2' then
  88.  
  89. end
  90. end,
  91. function(data, menu)
  92. menu.close()
  93. end)
  94. end
  95. function SpawnCar(veh)
  96. local x,y,z = table.unpack(GetOffsetFromEntityInWorldCoords(PlayerPedId(), 0.0, 8.0, 0.5))
  97. vehiclehash = GetHashKey(veh)
  98. RequestModel(vehiclehash)
  99. Citizen.CreateThread(function()
  100. local waiting = 0
  101. while not HasModelLoaded(vehiclehash) do
  102. waiting = waiting + 100
  103. Citizen.Wait(100)
  104. if waiting > 5000 then
  105. ShowNotification("~r~Could not load the vehicle model in time, a crash was prevented.")
  106. break
  107. end
  108. end
  109. CreateVehicle(vehiclehash, x, y, z, GetEntityHeading(PlayerPedId())+90, 1, 0)
  110. end)
  111. end
Add Comment
Please, Sign In to add comment