From f45d723db5d2ddc8bc17f66195eab4e2a4e03540 Mon Sep 17 00:00:00 2001 From: KingMcDonalds Date: Sun, 4 Jan 2026 22:18:36 -0800 Subject: [PATCH] fixing fivepd --- resources/fivepd-compatlayer/fxmanifest.lua | 29 +++++ resources/fivepd-compatlayer/rpc.lua | 99 ++++++++++++++++++ .../KidnappingCallouts.net.dll | Bin 0 -> 14848 bytes .../callouts/KidnappingCallouts/config.json | 14 +++ resources/fivepd/config/vehicles.json | 8 +- server.cfg | 11 +- 6 files changed, 154 insertions(+), 7 deletions(-) create mode 100644 resources/fivepd-compatlayer/fxmanifest.lua create mode 100644 resources/fivepd-compatlayer/rpc.lua create mode 100644 resources/fivepd/callouts/KidnappingCallouts/KidnappingCallouts.net.dll create mode 100644 resources/fivepd/callouts/KidnappingCallouts/config.json diff --git a/resources/fivepd-compatlayer/fxmanifest.lua b/resources/fivepd-compatlayer/fxmanifest.lua new file mode 100644 index 000000000..d9ec6ca92 --- /dev/null +++ b/resources/fivepd-compatlayer/fxmanifest.lua @@ -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. diff --git a/resources/fivepd-compatlayer/rpc.lua b/resources/fivepd-compatlayer/rpc.lua new file mode 100644 index 000000000..06144adf2 --- /dev/null +++ b/resources/fivepd-compatlayer/rpc.lua @@ -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 diff --git a/resources/fivepd/callouts/KidnappingCallouts/KidnappingCallouts.net.dll b/resources/fivepd/callouts/KidnappingCallouts/KidnappingCallouts.net.dll new file mode 100644 index 0000000000000000000000000000000000000000..908364669a4d54a33e4692d7430041df8681c098 GIT binary patch literal 14848 zcmeHOeRLevb-!dG z*%p$Vb@(VwLIU~XkTeaDrj&3_^GOqu(m-f(LQiSJIiYP*%!xyrkDlgG64KI~*7SGZ zoBfb18>Fl~ol_NxfvibnZJIl(koOv>b^1}51 zsFQtl?M6vn5m*&-vQ7deY1>gCJW#E;%dTx0u9#z{Y%sE|l*i4ouEkw;Z6j(gD@ycD z^q()bO(P%O$39<1B$)U+Ty-rz%Ay_G8(Or1D41OUu%;;)`7@YgH=-~aoKdROq67L7JS40IV` zimm{0ItZ_YNt>>ePtP=bgmS}lg?vt_>L@fctM;4F9-+YPS8;pvLbgXoWV?FRPLZR~ z)EuTME=AX{4MWadurRt7xF>oU;DW|z6pyu6462&Ti#6T_(JN56Vx{JZHZubIee?uO z!LOk;t-K#pv1WnuAS6DvrqTJdd@gi8FQ1E?Z_4Ll=X>(G#Cc6VmpZ?e&t;BBaJ%JB zwR|>JILj0gbgoiJrPHR6DyL5&)lNboA;(rojq@Ib)H?51h~Ye>kg)TpLh78S6jJZJ zppXXV?-jDZd0iomj?mbgriG57kVVcig)DZO6|%&+ULi}JZiOs!4k={0lTb*LlT}E> zxkn)@oQD{h#*Fj+cShagkm^R=GmKs=>ZllZn4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hq$vfW63_IuA^UvOQv&4z zPp#u}|6e|y^O4KGX_aF%Q_k#>nmta}$~JB2EuS975Pd0lGlKD(Il{BsvA%ggBibdAIt1#{VTA_%A3bJMI7g literal 0 HcmV?d00001 diff --git a/resources/fivepd/callouts/KidnappingCallouts/config.json b/resources/fivepd/callouts/KidnappingCallouts/config.json new file mode 100644 index 000000000..5fb553b5e --- /dev/null +++ b/resources/fivepd/callouts/KidnappingCallouts/config.json @@ -0,0 +1,14 @@ +{ + "Deathkidnapping":{ + "IgnoreDistance":false, + "MinTimeout":0, + "Probability":2, + "Departments":null + }, + "NormalKidnapping":{ + "IgnoreDistance":false, + "MinTimeout":0, + "Probability":2, + "Departments":null + } +} \ No newline at end of file diff --git a/resources/fivepd/config/vehicles.json b/resources/fivepd/config/vehicles.json index 0b2c5c236..9fe81c004 100644 --- a/resources/fivepd/config/vehicles.json +++ b/resources/fivepd/config/vehicles.json @@ -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" diff --git a/server.cfg b/server.cfg index 4c2ae52ed..41cf093a2 100644 --- a/server.cfg +++ b/server.cfg @@ -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