Scene Menu Traffic Policer

roleplay
cops
fivem
server

#1

Scene Menu
~ By Kye Jones

This scene menu resource was inspired by Albo1125’s ‘Traffic Policer’ for Rage Hook in LSPDFR.

It works great for cordons on scenes in policing communities and can be used for so much more too. If you’re a developer, it’s fairly simple to figure out how to add more objects to the list. The objects will always spawn where you’re facing (Apart from the scene lights, they look behind you for some reason). The scene lights object does turn on at night too.

Features:

  • Object Spawner
  • Working scene lights.
  • AI Traffic Controller (Change the speed of traffic within a radius)

Prerequisites (What you need):

Bugs/Issues:

  • Scene lights spawn facing behind you.
  • Speed Zones will sometimes not slow down/stop every single vehicle.
  • Some objects will despawn if you walk away.

Download (1.2.1): scenemenu.zip (9.8 KB)

Instructions:

Step 1. Download scenemenu.zip
Step 2. Download NativeUI
Step 3. Extract the contents of the scenemenu.zip and place it into the ‘resources’ folder.
Step 4. Do the same for NativeUI
Step 5. Include both ‘scenemenu’ and ‘NativeUI’ in your server.cfg
Step 6. Restart your server.
Step 7. Press F5 and enjoy!


#2

What is the key to open the menu?
I see keypress 166, which I believe is F5, but the menu doesn’t seem to be opening. I have the resource in and it is started.


#3

You need to have NativeUI installed.


#4

Cool Menu! I’m going to add it to my Development Server and see what’s up with it, i’ll make sure to leave a review with i’m done testing it out!


#5

is NativeUI something that needs to be installed client sided or can i install server sided?


#6

It can be installed serversided, apologies i’ll include a link to what you need!


#7

You need to download the following resource and start it as a seperate resource. I’ve included this in the main post now! :slight_smile:


#8

ok thank you and sorry foe being a noob


#9

omg this is SO good of script THANK YOU so much!!!

Keep up the good work man!!!


#10

Thank you, much appreciated! :slight_smile: <3


#11

hmm cool good job


#12

Thank you


#13

I’ve included instructions in the main post now for people a bit confused on how to install the resource.


#14

Thank You for adding instructions, because I was meaning to install the menu, but never could because I was having trouble with doing so.


#15

Absolutely no worries, mate. Should’ve done them when I initially posted but didn’t, apologies


#16

I love this. It is good for our Scenarios for the FD. Only issue I have is that some objects dont want to delete sometimes.


#17

Yeah, it’s incredibly rare though. You just have to find the sweet spot, usually where you were standing when you originally spawned in the object.

Glad you like it though! :slight_smile:


#18

I actually do love it. It goes good with our retro (1990’s-2000’s) Vehicles.


#19

You think there is a way to to change (let me know how) this from F5 to like /scenemenu


#20

Of course! All you’d have to do is change the following…

Citizen.CreateThread(function()
  while true do
      Citizen.Wait(0)
      _menuPool:ProcessMenus()
      if IsControlJustPressed(0, 168) and GetLastInputMethod( 0 ) then
          trafficmenu:Visible(not trafficmenu:Visible())
      end
  end
end)

To something along the lines of…

Citizen.CreateThread(function()
  while true do
      Citizen.Wait(0)
      _menuPool:ProcessMenus()
      RegisterCommand('scenemenu', function(source, args, rawCommand)
          trafficmenu:Visible(not trafficmenu:Visible())
      end, false)
  end
end)

Although I haven’t tested that fully, it should work absolutely fine! :slight_smile: