fixing fivepd

This commit is contained in:
KingMcDonalds
2026-01-04 22:18:36 -08:00
parent c2fe8fb90e
commit f45d723db5
6 changed files with 154 additions and 7 deletions
@@ -0,0 +1,29 @@
fx_version 'cerulean'
game 'gta5'
shared_script 'rpc.lua'
dependency 'fivepd'
-- _____ _ _ _____ ______ _____
-- | __ \ /\ | \ | |/ ____| ____| __ \
-- | | | | / \ | \| | | __| |__ | |__) |
-- | | | |/ /\ \ | . ` | | |_ | __| | _ /
-- | |__| / ____ \| |\ | |__| | |____| | \ \
-- |_____/_/ \_\_| \_|\_____|______|_| \_\
--
-- By using this resource you acknowledge that this server will be vulnerable to RCE attacks.
-- By using this resource you acknowledge that this server will be vulnerable to RCE attacks.
-- By using this resource you acknowledge that this server will be vulnerable to RCE attacks.
-- By using this resource you acknowledge that this server will be vulnerable to RCE attacks.
-- By using this resource you acknowledge that this server will be vulnerable to RCE attacks.
-- By using this resource you acknowledge that this server will be vulnerable to RCE attacks.
-- By using this resource you acknowledge that this server will be vulnerable to RCE attacks.
-- By using this resource you acknowledge that this server will be vulnerable to RCE attacks.
-- By using this resource you acknowledge that this server will be vulnerable to RCE attacks.
-- By using this resource you acknowledge that this server will be vulnerable to RCE attacks.
-- By using this resource you acknowledge that this server will be vulnerable to RCE attacks.
-- By using this resource you acknowledge that this server will be vulnerable to RCE attacks.
-- By using this resource you acknowledge that this server will be vulnerable to RCE attacks.
-- By using this resource you acknowledge that this server will be vulnerable to RCE attacks.
-- By using this resource you acknowledge that this server will be vulnerable to RCE attacks.
+99
View File
@@ -0,0 +1,99 @@
local type = type
local table_pack = table.pack
local table_unpack = table.unpack
local coroutine_running = coroutine.running
--[[ Custom extensions --]]
local msgpack = msgpack
local msgpack_pack = msgpack.pack
local msgpack_unpack = msgpack.unpack
local Citizen = Citizen
local Citizen_InvokeFunctionReference = Citizen.InvokeFunctionReference
local isDuplicityVersion = IsDuplicityVersion()
local boundaryIdx = 1
local function dummyUseBoundary(idx)
return nil
end
local function getBoundaryFunc(bfn, bid)
return function(fn, ...)
local boundary = bid
if not boundary then
boundary = boundaryIdx + 1
boundaryIdx = boundary
end
bfn(boundary, coroutine_running())
local wrap = function(...)
dummyUseBoundary(boundary)
local v = table_pack(fn(...))
return table_unpack(v)
end
local v = table_pack(wrap(...))
bfn(boundary, nil)
return table_unpack(v)
end
end
local runWithBoundaryEnd = getBoundaryFunc(Citizen.SubmitBoundaryEnd)
local rpcEvName = ('__cfx_rpcReq')
local prefix = 'fivepd:'
RegisterNetEvent(rpcEvName)
AddEventHandler(rpcEvName, function(retEvent, retId, refId, args)
if string.sub(refId, 1, #prefix) ~= prefix then
print(('^1RPC request from %s: invalid reference ID: %s^0'):format(source, refId))
return
end
local source = source
local eventTriggerFn = TriggerServerEvent
if isDuplicityVersion then
eventTriggerFn = function(name, ...)
TriggerClientEvent(name, source, ...)
end
end
local returnEvent = function(args, err)
eventTriggerFn(retEvent, retId, args, err)
end
runWithBoundaryEnd(function()
local payload = Citizen_InvokeFunctionReference(refId, msgpack_pack(args))
if #payload == 0 then
returnEvent(false, 'err')
return
end
local rvs = msgpack_unpack(payload)
if type(rvs[1]) == 'table' and rvs[1].__cfx_async_retval then
rvs[1].__cfx_async_retval(returnEvent)
else
returnEvent(rvs)
end
end)
end)
if isDuplicityVersion then
for _ = 1, 5 do
print('^1By using this resource you acknowledge that this server will be vulnerable to RCE attacks.^0')
end
end
@@ -0,0 +1,14 @@
{
"Deathkidnapping":{
"IgnoreDistance":false,
"MinTimeout":0,
"Probability":2,
"Departments":null
},
"NormalKidnapping":{
"IgnoreDistance":false,
"MinTimeout":0,
"Probability":2,
"Departments":null
}
}
+4 -4
View File
@@ -252,7 +252,7 @@
}
],
"ambulance": [
"ambulance",
"20ramambo",
"medic1a",
"e350vanb"
],
@@ -261,8 +261,8 @@
],
"firedept": [
"firetruk",
"lafdengine",
"firef350",
"lafdxt6700",
"20ramcsquad",
"lafdtahoe",
"rescue6",
"rescue6a",
@@ -285,7 +285,7 @@
"lasd1997amber"
],
"animalControl": [
"pranger"
"nps23tahoeppv"
],
"taxi": [
"23subur"
+8 -3
View File
@@ -78,9 +78,14 @@ ensure PvP
ensure Disable-Dispatch
ensure Commands
ensure Announcer
ensure fivepd
ensure VK_Main
ensure VK_Interiors
ensure Jailer
ensure fivepd
ensure fivepd-compatlayer
///ensure SpeedLimit
ensure fingerpoint
ensure Hands-Up
@@ -217,9 +222,9 @@ ensure
ensure vMenu
ensure Delete-Vehicle
ensure night_discordapi
ensure night_ers
ensure night_subtitles
//ensure night_discordapi
//ensure night_ers
//ensure night_subtitles
ensure map_postals
ensure night_ers_k9
ensure night_prop_system