[Release] Police Blips [OneSync]

Police Blips

License GNU-GPL v3 Total downloads Total downloads

Hey guys! I decided to release another script I’d written. The script shows blips of all police units (for colleagues). You can easily automate it with your ESX police job. Blips are customizable as for colors and possible pre-fixes. I’ve also included a script to check the nearest vehicle’s window tint (I will maybe continue on expanding this script with similar features). Please let me know if there are any problems and feel free to create pull requests :slight_smile:

Since I’m getting a lot of questions about it, the script is standalone, but you’ll have to add players to the radar manually using these server events if you don’t use the built in ESX functionality. If you use ESX, you just fill in the police job name in the config!

image
The blip above was set using callsign L-21

Installation

Drop the folder policetools into your resources folder and start it using the console / add it to the server configuration.

console

refresh followed by start policetools

server.cfg

start policetools

Please note that the latest artifacts may cause issues with the RegisterKeyMapping native, resulting in the script not working properly or at all.

Usage & Commands

/callsign <callsign> - Sets the callsign to the specified one, will change your blip’s appearance on the map. (e.g. L-11 → blue dot with 11 in it)

  • <callsign>: string - your callsign, formatted: e.g. L-21, C-3

/policeblip <action> <playerID> Admin tool to manually add / remove / hide / show a player on the map, turn the blips on / off.

  • <action>: add / remove / hide / show / on / off - specifies the action (on and off turns the blips globally on/off)
  • <playerID>: int - the player ID (leave empty if you want to apply the action on yourself)

/tint - Checks the nearest vehicle’s window tint.

You can find the blip colour codes which you need to use in config here.

Compatibility

OneSync is required to make this script work as it obtains player coordinates server-side.

Known bugs

None :slight_smile: Feel free to submit an issue on GitHub if you find any.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Credits

Mickey#2590, @modz_mcfarlane, @Gamerbiggie for testing the script and good suggestions.

Thanks!

License

GNU GPL 3.0

Download link

Latest release

GitHub

GitHub


Like the script? Don’t forget to :heart:

21 Likes

Nice release!

1 Like

Is this also standalone?

1 Like

It is, but you will have to implement automatic blip subscription (adding the player blips to the map) yourself.

Reference to the events you’ll need: policetools/units.lua at 73ca53100ecededc82f7764d4d09e458947fdb29 · gimicze/policetools · GitHub

Do you have a none ESX version?

Amazing script mate, just a suggestion. Reckon it would be possible to make a function to check if a player is wearing a seatbelt? Similar to checking whether the players window tint?

2 Likes

Love this

1 Like

The script is standalone, you can turn ESX functions off in the config, but you’ll have to implement your own system of adding players to the radar.

2 Likes

Alright thanks!

1 Like

Unfortunately, seatbelts aren’t done using a native and thus it depends on which seatbelt script you’re using. I won’t be able to write a universal script to check that. But hit me a DM with details and I will help you out, if you need it :slight_smile:

I love this script especially the tint part! Such a cool concept ! I was wondering if theres anyway to make a gps item. If the officer has the gps in their inventory it displays their blimp, and if they do not have a gps on them it does not display the blimp ? (esx)

Hi! Glad you like the script. I just published a pre-release which implements the function you’ve requested. You’ll only have to create the item in the database and configure it in config.lua (there’s also information about how it works).

Haven’t had the chance to test it though - it’d be nice if you tested it, since I probably won’t manage to do so in the next few days. :smiley:

Nice script which ive been playing around with, just have a question how is the color defined, like can you change the colors, do they use some kind of color wheel to determine the color bound to the number in the config?

1 Like

Oh, I forgot to put the link in the config. You can find the colour codes here: (under “Blip Colours”)

Hope that helps :slight_smile:

it helps alot thank you so much

and again very nice release the servers finest loves it :slight_smile:

1 Like

Thanks, glad you and your community like it :smiley:

would be nice add a /panic to this so it sends location to cops with gps item and map blip :slight_smile:

1 Like

Will probably do that in the next few days. :slight_smile: Thanks for your suggestion.

2 Likes

keep me updated :slight_smile: sounds good

@GIMIcz I cannot get this working :frowning: where do you put that code you mention for esx? i have an error for units.lua:370 but the units.lua only goes up to 270 lol