[Release] ESX_SPEEDCAMERA (60, 80 & 120 ZONES, BILLING & BLACKLISTED VEHICLES)

rp
esx
speedcamera

#1

Hello, this is another release for ESX. This is a speed camera script that will fine anyone who’s speeding, maximum speed is 120KMH, as default there is three zones, 60, 80 and 120. There are currently five speed cameras placed out and it’s up to you to add more, I don’t have time to sit and place out cameras. This script is great for a serious community. Show this post some love! :heart:

I’ve found one speed camera script for ESX on the forum, but I’ve seen many people who didn’t get that one to work properly, this one is just to drop & drag and you’re ready to go, just remember the requirements.

#Information

This is version: 0.2 (FIX) (Updated: 2019-02-14 - 21:59)

#Requirements

Open

#Screenshots

Open

#Features

Open
  • The speed is currently in KMH and not MPH.
  • There are only five speed cameras placed, I don’t have time to set them out myself and therefore I decided to release if for you to take your own time and place them wherever you’d like.
  • There’s a 60, 80 and a 120 KMH zone, any speed in a vehicle above that will fine you, the fine will be placed in your F7 menu (Default from ESX_BILLING) and it will be sent from “society_police”.
  • All speed cameras are placed and visible on the minimap, small red dots called “Speedcamera (THE SPEED KM/H)”.
  • Blacklisted vehicles are currently: “POLICE”, “POLICE2”, “POLICE3”, “POLICE4”, “POLICEB”, “POLICET” and “FIRETRUK”. I did not get the “AMBULANCE” to work so that’s up to you to solve.
  • Notifications are based on pNotify, placed left to center, a bit above the minimap.
  • You’ll not be able to get caught by the same camera for five seconds after you’ve already been caught speeding.
  • Flashing screen when getting caught.
  • Sound when getting caught.
  • Settings in client.lua where you can modify the script.
  • Optional to use ESX_BILLING, as default it’s active, change it in the settings in client.lua to your own preferences.
  • Police will be alarmed if someone pass any camera above 150 KMH, it’s configurable but as default it’s 150 KMH.

#Installation

Open
  1. Extract esx_speecamera.rar into your resource folder.
  2. Move the speedcamera.ogg into “InteractSound”, make sure you load the .ogg file in the “__resource.lua” inside of “InteractSound”
  3. Start the script in your server.cfg or wherever you start scripts. Correct row: start esx_speedcamera
  4. Start/Restart your server.
  5. Done, have a safe drive!

#Credit

Open

If you wish to re-upload this script you first need my confirmation, send a private message to me and we could discuss it.

#Download:
Direct download: esx_speedcamera.rar (48.3 KB)
Github: https://github.com/P4NDAzzGaming/esx_speedcamera

#Note: If you find any issues with this script then just simply leave a comment and we’ll get into to that and trying to solve your problem. The script works as it is but there might be “better” solutions for some of the functions. Feel free to post your improvements.

Best regards
– P4NDA


#2

It is a funny script, but there will always be PSP cars that will not give to add, could not be by JOB? POLICEJOB and AMBULANCEJOB?


#3

This is nice m8 you did some good work m8 Can you make custom props and then place them at the spots so you can see the speed cameras


#4

Awesome release, will use it, thanks.

Would you mind on sharing your esx menu style?
Liked it. Thank you again.


#5

I was thinking of restricting to policejob & ambulance but then I noticed that when they’re driving around without being on duty, they can just pass the cameras without even caring.


#6

elseif GetDisplayNameFromVehicleModel(GetEntityModel(veh)) == “AMBULANCE” then – BLACKLISTED VEHICLE


#7

Did not work!


#8

I preferred that the policejob and ambulance had no fines, because I have huge cars that I do not accept.
but here’s a good job.


#9

Nice Release Love This :wink:


#10

To come:

  • Flashing effect on screen when caught.
  • Camera sound when caught.
  • Stolen vehicles that gets caught will be alarmed to the police.
  • Minimal chance to avoid to get caught.
  • More cameras will be placed out.
  • Props or something similar will be added.

#11

Good man…

Look forward to trying it on next update


#12

Version: 0.2 is here and released, thanks!

What’s new?

  • Configurable settings in client/client.lua, top rows. (You won’t miss it, trust me!)
  • Flashing screen when getting caught (configurable).
  • Camera sound when getting caught (configurable).
  • To use ESX_BILLING or to take the money from the driver directly (configurable).

Downloads

Best regards
– P4NDA


#13

Would you mind on sharing your esx menu style?
Liked it.
Thanks.


#14

Nice script, I made this edit:
If you want to blacklist all vehicles that are emergency class replace this in the client main.lua

								if GetDisplayNameFromVehicleModel(GetEntityModel(veh)) == "POLICE" then -- BLACKLISTED VEHICLE
								elseif GetDisplayNameFromVehicleModel(GetEntityModel(veh)) == "POLICE2" then -- BLACKLISTED VEHICLE
								elseif GetDisplayNameFromVehicleModel(GetEntityModel(veh)) == "POLICE3" then -- BLACKLISTED VEHICLE
								elseif GetDisplayNameFromVehicleModel(GetEntityModel(veh)) == "POLICE4" then -- BLACKLISTED VEHICLE
								elseif GetDisplayNameFromVehicleModel(GetEntityModel(veh)) == "POLICEB" then -- BLACKLISTED VEHICLE
								elseif GetDisplayNameFromVehicleModel(GetEntityModel(veh)) == "POLICET" then -- BLACKLISTED VEHICLE
								elseif GetDisplayNameFromVehicleModel(GetEntityModel(veh)) == "FIRETRUK" then -- BLACKLISTED VEHICLE

With this:

			                local class = GetVehicleClass(veh)
							    if( class == 18) then
								elseif GetDisplayNameFromVehicleModel(GetEntityModel(veh)) == "POLICE" then -- BLACKLISTED VEHICLE
								elseif GetDisplayNameFromVehicleModel(GetEntityModel(veh)) == "POLICE2" then -- BLACKLISTED VEHICLE
								elseif GetDisplayNameFromVehicleModel(GetEntityModel(veh)) == "POLICE3" then -- BLACKLISTED VEHICLE
								elseif GetDisplayNameFromVehicleModel(GetEntityModel(veh)) == "POLICE4" then -- BLACKLISTED VEHICLE
								elseif GetDisplayNameFromVehicleModel(GetEntityModel(veh)) == "POLICEB" then -- BLACKLISTED VEHICLE
								elseif GetDisplayNameFromVehicleModel(GetEntityModel(veh)) == "POLICET" then -- BLACKLISTED VEHICLE
								elseif GetDisplayNameFromVehicleModel(GetEntityModel(veh)) == "FIRETRUK" then -- BLACKLISTED VEHICLE

Then you can go ahead and blacklist other vehicles that aren’t emergency class if you wish.

Also if you want to blacklist the ambulance you need to put:

elseif GetDisplayNameFromVehicleModel(GetEntityModel(veh)) == "AMBULAN" then -- BLACKLISTED VEHICLE

#15

Good work as usual p4nda👍


#16

Appreciated, thanks for the improvement! :heart:


#17

No problem.


#18

How to remove the blips? Thanks in advance


#19

That will be configurable in Version: 0.3 but follow the steps belove:

  1. Open client/client.lua.
  2. Delete: row 52 -> 81.
  3. Clear cache & start/restart your server.

Best regards
– P4NDA


#20

Thanks alot