[Release] Speedcamera

this script alow you to get speed from vehicle near you, and tell to you the speed and the plate.
Also speed comes in 2 color:
green when vehicle are in safe speed,red when are in excessive speed.
Made for RP games.


if you want to configure max speed allowed, edit the script speedcamera.lua and change “maxSpeed” value.

Download

install:
Extract in your resources folder.

call in your .yml with “- speedcamera”

Instruction:

press and hold “caps-lock” when you are near a way(like as image).

For viewing display, vehichle need to run at certain speed(configurable via “minSpeed” value in the script)

12 Likes

Works great, thank you for the post! @Clod_TIF

Ive noticed it only works for NPC’s, is this by design or a mistake??? @Clod_TIF

i will check. thath also work’s for car’s and bike,buot for emergency vehicle.

Just checked,actually work’s only if driver are a npc’s. try to fix then update.

Get vehicle of player
local Veh = GetVehiclePedIsIn(GetPlayerPed(GetPlayerFromServerId(PID)), false)

Works great, Thanks… Is there any way to change the key binding to something else?

Where in the code do I add this line?

in the code find

IsControlPressed(1, 217)

change value 217 to your needed value.Google for correct value you need.

I’m not finding any list that correlates the CapsLock to 217… Can you be a tad more specific on where to find a list of correct key bindings?

by nativeDb:

Mapped keyboard keys are:

7 - l
8 - s
9 - d
10 - Page up
11 - Page down
12 - mouse move down
13 - mouse move right
18 - space or enter
19 - L Alt
20 - z
21 - L Shift
23 - f
32 - w
34 - a
36 - L Ctrl
39 - [
40 - ]
44 - q
45 - r
51 - e
56 - F9
57 - F10
58 - g
60 - num pad 5
61 - num pad 8
197 - ]
199 - p
202 - Backspace
205 - q
206 - e
209 - L Shift
211 - tab
213 - home
214 - del
215 - enter
216 - spacebar
217 - Caps lock
224 - L Ctrl
232 - w
233 - s
234 - a
235 - d
236 - v
239 - Cam +
240 - Cam -
241 and 242 for the mouse wheel up and down.
243 - ~
244 - m
245 - t
246 - y
249 - n
329 - LMouseBtn
330 - 331 - RMouseBtn

2 Likes

Ah, Ok… Thank you… Much appreciated

Did you fix the NPC problem? does it work for online players aswell now?

im triyng to fixing. when done,i put update here.

@DarkWolf2985 no problem :wink:

2 Likes

@Clod_TIF Thank you for trying to fix and releasing this!!!

nice work, keep it up! I can help, if you need.

1 Like

thank you, any help or suggest are appriciated.

thank you for suggestion,but seem not work.

GetClosestVehicle() does not work for players. I used native GetEntityPlayerIsFreeAimingAt(), for a radar “gun,” and checked if entity is a vehicle, occupied, etc.

nice suggestion,thank you.