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 000000000..908364669 Binary files /dev/null and b/resources/fivepd/callouts/KidnappingCallouts/KidnappingCallouts.net.dll differ 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