ed
This commit is contained in:
parent
2fd4906414
commit
9d4f625a84
962 changed files with 36 additions and 36 deletions
8
resources/[weapons]/[Scripts]/z4-xhair/README.md
Normal file
8
resources/[weapons]/[Scripts]/z4-xhair/README.md
Normal 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)
|
||||
14
resources/[weapons]/[Scripts]/z4-xhair/client/cl_xhair.lua
Normal file
14
resources/[weapons]/[Scripts]/z4-xhair/client/cl_xhair.lua
Normal 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)
|
||||
12
resources/[weapons]/[Scripts]/z4-xhair/fxmanifest.lua
Normal file
12
resources/[weapons]/[Scripts]/z4-xhair/fxmanifest.lua
Normal 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',
|
||||
}
|
||||
13
resources/[weapons]/[Scripts]/z4-xhair/ui/index.html
Normal file
13
resources/[weapons]/[Scripts]/z4-xhair/ui/index.html
Normal 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>
|
||||
Loading…
Add table
Add a link
Reference in a new issue