[Beta] StationaryRadars (28/05/17)

StationaryRadar - Beta

Description

This script allows you to set multiple stationary radars that trigger if players drive too fast.

There is also no notification right now (will be added soonish) if someone drives too fast past a radar, it will only flash. More info and upcoming features at github.

latest download here

preview1

Requirements

  • DisableAuth set to false on your server inside citmp-server.yml
  • MySQL database

Current Features

  • show / hide blips for stationary radars
  • flashing radars if a player drives too fast
  • permissions for who can use all these features

Commands

All commands require a permission level of 1

  • /show radars - Shows yellow blips on all radar spots
  • /hide radars - Hides all blips
  • /set speedradar - Sets a stationary radar at your current position
  • /remove speedradar - Removes the radar at your current position

Installation

  • You may have to unblock the following file lib\MySql.Data.dll
  • Edit the config.lua and set your database host, schema, user and password

Execute the following sql command on your database

CREATE TABLE `stationaryradar` (
  `x` double(8,2) NOT NULL,
  `y` double(8,2) NOT NULL,
  `z` double(8,2) NOT NULL,
  `maxspeed` int(11) NOT NULL
);

CREATE TABLE `stationaryradar_permissions` (
  `steamid` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `permission_level` int(11) NOT NULL,
  PRIMARY KEY (`steamid`)
);

Players will be automatically added to the permissions table once they enter your server.

You have to set their permission_level to 1 if they should be able to set up cams and see them in this script.

If you see any bugs, have questions or like to leave some feedback please do so.

Changelog

Beta 28/05/17

  • Added /remove speedradar command
  • Moved configurable settings into config.lua

Beta 27/05/17

  • Initial Release
15 Likes

Waaw ! good job bro ! :slight_smile:

very nice job can’t want for a next release

See this is what this forum is missing, Small little scripts that have big impact! Great job.

Be nice to have a function where lets say the speed limit it set to 30mph. If you go through at 35 it flashes with a warning in chat, If you do say 45mph through it you get a speeding ticket/Fine. If you go 80mph through it, it alerts the police and shows a blip on the map for say 15 seconds of the players location.

2 Likes

Wow! this is great! testing it right away! thanks alot!

How to …
in windows 10
thx

Should be:
Rightclick on file > Properties >General Tab > Unblock

no unblock in my generald tab its normal ?

Who does this show to? Police? Set permission? Or everyone?

https://github.com/DreanorGTA5Mods/StationaryRadar/blob/master/preview1.png

To no one yet. Will be shown to all the people with permission once it’s done.

Ahhh okay! Ill keep checking back for an update then :smiley:

You think adding an object to materialize the radar on the road ?

I have been thinking about spawning a cop car or something at the location. Just wanna get the basic stuff done first before I add more things.

the script is not loading in my server

My resource is called stationaryradar and not radar

Very nice :smiley: thank !

Hello, I followed the instructions to the letter but I have this error, can you help me please, Thank.

Hello,

Why you do “speedcam position” - “player position” and “player position” - “speedcam position” in the function isPlayerInCamRange(), the result will be the same number negative and positive?

Hi,

I have not modified anything in the script it is of origin

Because my radar gets triggered if you enter it’s circle going from the middle.