Security HUD
System Watchdog
×
Threads Scanned
-- / --
SYS. LOAD --%
AI SHIELD ACTIVE
DMCA Policy
×

📋 DMCA Compliance

This platform and community fully complies with the Digital Millennium Copyright Act (DMCA) and international copyright laws. We take all copyright protection seriously.

🛡️ Copyright Protection

If you believe a posted item belongs to you or violates your copyright, you may file a DMCA takedown request through our official channels. Upon receiving a valid claim, the infringing content will be removed within 24 hours.

What's new
×
Fiveguard

Guide Bug Solution Via Np-menu

Respown

Gold Elite
Joined
Aug 3, 2021
Messages
192
Solutions
1
Reaction score
98,700
Points
306
Location
root
Hello guys,

His action:
Selecting script from F8 > nui_devtools > js section, np-menu throws the post request below.
$.post(' ', JSON.stringify({action: "esx:spawnVehicle", parameters: "drafter"}));
I thought that I should bring a limitation to this in addition to the tool in a single line.
np-menu > client_menu.lua > find triggerAction nui callback it will look like below.

Code:
Code:
-- Callback function for when a slice is clicked, execute command
RegisterNUICallback('triggerAction', function(data, cb)
showMenu = false
SetNuiFocus(false, false)
SendNUIMessage({
state = 'destroy'
})

PlaySoundFrontend(-1, "NAV", "HUD_AMMO_SHOP_SOUNDSET", 1)

TriggerEvent(data.action, data.parameters)

cb('ok')
end)

Change it as follows so it won't work with any triggers that are not allowed in the config.

Code:

Code:
RegisterNUICallback('triggerAction', function(data, cb)
showMenu = false
SetNuiFocus(false, false)
SendNUIMessage({
state = 'destroy'
})

PlaySoundFrontend(-1, "NAV", "HUD_AMMO_SHOP_SOUNDSET", 1)

local result = false
for key,value in pairs(newSubMenus) do
if value.functionName == data.action then
result = true
break
end
end

if result then
TriggerEvent(data.action, data.parameters)
end

cb('ok')
end)
 
Top