[Release] Police Blips [OneSync]

Hi! It seems that there’s an error on the server side. Please DM me the details about this error, a screenshot will suffice. I’ll have a look at it. Thanks :slight_smile:

Might be an interesting feature that it wouldn’t show nearest blips in radius of 500 units, since that what can be shown client side. For example, with esx_policejob, if you would be in active pursuit, practically instant response of your police colleagues would be a huge benefit. For further distances across the map, slower response called via PoliceTools is good enough.

Great resource anyway, many thanks!

1 Like

Will look into that when I get the chance, thanks for your suggestion and the kind words :slight_smile:

Also one more thing came up from my testing today. Since there’s that delay and it’s not “real time”, even more helpful would be to have the possibility to get direction of where players are looking to. So it wouldn’t be only coords, but rotation as well, so you could see icons of players and where they are heading to. With slower response time on the map, this would be great thing to have. You wouldn’t have to wait to refresh it again just to see which way is the blip actually heading at that point.

I’ve just pushed the proposed changes to the GitHub repo, haven’t tested it though as I don’t currently have a server to test it on :smiley:

1 Like

Thanks for the update!

Would be possible to implement also blips separately for certain departments under ESX/ExM? So for example EMS won’t see PD blips and vice versa?

If that would be complicated, different colours would be significant improvement. Without it people can get easily confused with larger amount of players on the map

I was actually considering this initially when I was writing this script, but have decided not to go that way. It is, in theory, ready to be done but I probably won’t mess with that for a while. (I’m fed up with lua right now :smiley: )

You can do that already :slight_smile: It is, however, tied with setting a callsign (that might be a concern?). You can set up different colours for different callsigns in the config.

Fed up with Lua, I feel you.

Ok, I haven’t noticed! I will try to rewrite it, so those colours can be assigned by the type of job player has. It shouldn’t be that difficult :slight_smile: Thanks again for this script, it saves us a lot of time and trouble.

1 Like

Is there a way to add more than to numbers in callsign like L-555 ?

Unfortunately, that’s not possible as the native the script is using only accepts numbers up to 99.

Great release! Any possibility you could add functionality for ace permissions with these commands?

1 Like

Which commands do you mean and what exactly do you want to achieve?

Sorry I wasn’t more specific. I would like anyone in ace group.leo are allowed to use commands such as /onduty.

There is no such command in this script. :smiley: All commands registered by this script are listed in the original post and the only one which requires ace permission (command.policeblip) is /policeblip.

Anyway, here are some natives which could help you find/do what you want:

Likely a really stupid question but im very new to understanding scripts/server stuff as i have a localhost…now i can do /callsign but i cant do /policeblip says I dont have permission…and if possible can someone put a finished where you input your stuff into the units.lua assuming that is where you need to add each player…i dont understand though when everytime you login in depending on who is there determines player ID/server ID or am i not looking at the right thing…Not gonna lie i dont want to give up on this one as I think its pretty dam awesome!!! Thanks for any help possible…

And I realize whats above my post but again not understanding where to put that native references and registered commands and how they should look…thanks again

Hi! I’ll try to help you out briefly.

Make sure you (or the principal your account has assigned) have the command.policeblip permission (or command to allow all commands). More on ACE permissions is here: Server Commands - Cfx.re Docs

As for your confusion about how players are managed, you have two options by default:

  1. add them by yourself manually (which was used only for debugging and testing)
  2. if you’re using ESX v1 final, fill your job name in the config; the script will then use ESX events to add / remove every player depending on their active job automatically.

If this doesn’t answer your questions, feel free to contact me in DMs with more details on what exactly you’re trying to achieve and some information about your server setup.

1 Like

image
image

so i added the add_ace to my server…does that look right?

I am getting a lot of lua errors for some unknown reason. The lua error goes like this;
@policetools/server/units.lua:70: attempt to perfom aritmethic on a nil value (local ‘letEnd’)

etc.

@policetools/server/units.lua:375 attempt to index a nil value

Thanks for letting me know. I’ve found a bug which caused the first error, I haven’t been able to reproduce the second problem though.

Please try to install the latest version and see if the error is still showing up. If that’s the case, send me more information about your setup (server artifact version, script version, whole snippets from the log showing the error, ESX version, script config, etc.) in a DM and I’ll have a look at it.

Thanks for taking your time to respond, it is still giving errors such as;
@policetools/server/units.lua:391: attempt to index a nil value.

I am afraid It still does not work.