Has anyone gotten this to work with zap? I keep getting this error and I dont know what i did wrong. (AssertionError [ERR_ASSERTION]: unexpected PromiseRejectEvent
e[91mError: (node:52962) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 5)e[0m)
How can I add cops to the database by there stream hex id? So they dont have to be in the server to be added. I can just add them and the next server restart they will beable to be a cop
Alright another issue, I went into the config and disabled the native garage trying to get them to go away. They don’t. What do I do? Whats the way to make it so they arint there
Same here, have you found a way to fix? I need the garage gone but it wont go away
ok i have a weird issue and i dont know how or were to start to fix it so here is my issue the f5 menu works just fine for me and everything had a player join the server did the copadd on him to put him in the same dpt as me and for some reason his f5 menu doesnt work when clocked in
Utilize this file to make this resource work 100% with Onesync, just drag and drop it into the client folder of the “police” resource.
client.lua (24.0 KB)
I achieved this by just updating the loops as stated in this post [How-to] Adapt your script to OneSync and fix your issues
First Loop Before
local localIdCops = {}
for id = 0, 64 do
if(NetworkIsPlayerActive(id) and GetPlayerPed(id) ~= PlayerPedId()) then
for i,c in pairs(allServiceCops) do
if(i == GetPlayerServerId(id)) then
localIdCops[id] = c
break
end
end
end
end
First Loop After
local localIdCops = {}
for id = 0, 256 do
if(NetworkIsPlayerActive(id) and GetPlayerPed(id) ~= PlayerPedId()) then
for i,c in pairs(allServiceCops) do
if(i == GetPlayerServerId(id)) then
localIdCops[id] = c
break
end
end
end
end
2nd Loop Before
function GetPlayers()
local players = {}
for i = 0, 31 do
if NetworkIsPlayerActive(i) then
table.insert(players, i)
end
end
return players
end
2nd Loop After
function GetPlayers()
local players = {}
for i = 0, 256 do
if NetworkIsPlayerActive(i) then
table.insert(players, i)
end
end
return players
end
Or…
function GetPlayers()
return GetActivePlayers()
end
/replace references of ‘GetPlayers()’ with ‘GetActivePlayers()’.
Hi there, is there a way to fix it so it automatically gives you weapons and armor when you clock in?
But I want to use the F5 Menu without having to go onduty how do I do that!!
Im getting the white police markers on the map but there is no circle to clock in and when I add myself as a cop there is no confirmation message. Please help.
Ok now I got the circle but I cant seem to equip any uniform it just closes the menu when I select a role.
i type /copadd (ID) not working huhuh please help me
e[91mError: (node:28885) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 12)e[0m
hey when i type this in RCON it gives me that error above and also the command doesnt work in the game console
Just saying guys, if your getting my issue then make sure the mod is called “police” not anything else.
How do I fix the object spawn menu? Keeps saying NULL for all objects but everything else works fine.
I dont really think they support the script anymore. Seems pretty dead, the code was never cleaned up so… I could be wrong
the object menu worked in older versions so i figured it would still work. well time for and older version. Plus it was updated last month AUG 4
Hmm… yeah I’m pretty confused on this too. It’s like they still give it minor updates but really just don’t care.
still works fine just the object list shows null lol btw i like your server
Oh thank you! When I get home I’ll take a look and see if I can fix it, it’s most likely just an invalid object, or a miss-spelled name