This commit is contained in:
Nordi98 2025-07-26 08:56:55 +02:00
parent 2fd4906414
commit 9d4f625a84
962 changed files with 36 additions and 36 deletions

View file

@ -0,0 +1,8 @@
# z4-xhair
Fivem Standalone Crosshair Script Inspired by NoPixel

# Install Tutorial
Download and drop into your resource file n enjoy

# Note
The script are Standalone so whatever your framework all can support (ESX, NP, QB)

View file

@ -0,0 +1,14 @@
--HELLO
Citizen.CreateThread(function()
while true do
Citizen.Wait(500)
local get_ped = PlayerPedId()
local get_ped_veh = GetVehiclePedIsIn(get_ped, false)

if (IsPlayerFreeAiming(PlayerId())) then
SendNUIMessage("xhairShow")
elseif not (IsPlayerFreeAiming(PlayerId())) then
SendNUIMessage("xhairHide")
end
end
end)

View file

@ -0,0 +1,12 @@
fx_version 'adamant'

games { 'gta5' }

ui_page 'ui/index.html'
files {
'ui/index.html',
}

client_scripts {
'client/cl_xhair.lua',
}

View file

@ -0,0 +1,13 @@
<div style="width: 100vw; height: 100vh; position: fixed; top: 0; left: 0; display: flex; align-items: center; justify-content: center;">
<div id="whatever" style="display: none; border-radius: 100%; border: 1px solid black; width: 2.5px; height: 2.5px; background-color: #D3D3D3;"></div>
</div>
<script>
window.addEventListener('message', (evt) => {
let ele = document.getElementById('whatever');
if (evt.data === 'xhairShow') {
ele.style.display = 'block';
} else {
ele.style.display = 'none';
}
});
</script>