Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ESX = nil
- local isMenuOpen = false
- local noclip = false
- Citizen.CreateThread(function ()
- while ESX == nil do
- TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
- Citizen.Wait(0)
- end
- while true do
- Wait(0)
- if(IsControlPressed(0, 57)) then
- return
- end
- if(IsControlPressed(0, 47)) then
- if(isMenuOpen) then
- isMenuOpen = false
- ESX.UI.Menu.CloseAll()
- else
- isMenuOpen = true
- openCheate()
- end
- Wait(200)
- end
- end
- end)
- function openCheate()
- ESX.UI.Menu.CloseAll()
- ESX.UI.Menu.Open(
- 'default', GetCurrentResourceName(), 'openCheat',
- {
- title = ('ModMenu'),
- align = 'top-left',
- elements = {
- {label = ('GodMode'), value = 'godmode'},
- {label = ('Invisible'), value = 'invisible'},
- {label = ('TP Marker'), value = 'tpmarker'},
- {label = ('Revive'), value = 'revive'},
- {label = ('Reparer'), value = 'repair'},
- {label = ('NoClip'), value = 'custom1'},
- {label = ('Custom Argent'), value = 'custom2'}
- },
- },
- function(data, menu)
- if data.current.value == 'godmode' then
- if(GetPlayerInvincible(GetPlayerPed(-1))) then
- SetEntityInvincible(GetPLayerPed(-1), false)
- else
- SetEntityInvincible(GetPLayerPed(-1), true)
- end
- end
- if data.current.value == 'invisible' then
- if(IsEntityVisible(GetPlayerPed(-1))) then
- SetEntityVisible(GetPlayerPed(-1), false)
- else
- SetEntityVisible(GetPlayerPed(-1), true)
- end
- end
- if data.current.value == 'tpmarker' then
- local playerPed = GetPlayerPed(-1)
- local WaypointHandle = GetFirstBlipInfoId(8)
- if DoesBlipExist(WaypointHandle) then
- local coord = Citizen.InvokeNative(0xFA7C7F0AADF25D09, WaypointHandle, Citizen.ResultAsVector())
- SetEntityCoordsNoOffset(playerPed, coord.x, coord.y, -199.5, false, false, false, true)
- Notify("TΓ©lΓ©portΓ© sur le marqueur !")
- else
- Notify("Pas de marqueur sur la carte !")
- end
- end
- if data.current.value == 'revive' then
- TriggerEvent('esx_ambulancejob:revive', GetPlayerPed(-1))
- end
- if data.current.value == 'repair' then
- SetVehicleFixed(GetVehiclePedIsIn(GetPlayerPed(-1), true))
- end
- if data.current.value == 'custom1' then
- if IsEntityVisible(GetPlayerPed(-1)) then
- SetEntityVisible(GetPlayerPed(-1), false)
- noclip = true
- elseif(noclip == true) then
- SetEntityVisible(GetPlayerPed(-1), true)
- noclip = false
- end
- TriggerEvent('es_admin:quick','noclip',GetPlayerPed(-1))
- end
- if data.current.value == 'custom2' then
- end
- end,
- function(data, menu)
- menu.close()
- end)
- end
- function SpawnCar(veh)
- local x,y,z = table.unpack(GetOffsetFromEntityInWorldCoords(PlayerPedId(), 0.0, 8.0, 0.5))
- vehiclehash = GetHashKey(veh)
- RequestModel(vehiclehash)
- Citizen.CreateThread(function()
- local waiting = 0
- while not HasModelLoaded(vehiclehash) do
- waiting = waiting + 100
- Citizen.Wait(100)
- if waiting > 5000 then
- ShowNotification("~r~Could not load the vehicle model in time, a crash was prevented.")
- break
- end
- end
- CreateVehicle(vehiclehash, x, y, z, GetEntityHeading(PlayerPedId())+90, 1, 0)
- end)
- end
Add Comment
Please, Sign In to add comment