[FREE] Police Menu for Menu Servers

Johns Police Menu

Features

  • Customizable Loadouts
  • Actions
    • Cuff/Uncuff
    • Drag/Undrag
    • Place in Vehicle
    • Remove from Vehicle
    • Remove Weapons
    • Place/Remove Spikestrips
    • image

  • Commands
    • /hu (Puts hands up)
    • /handsup (Puts hands up)
    • /surrender (Kneels on ground to give self up)
    • /kneel (Kneels on ground to give self up)
    • /k (Kneels on ground to give self up)
    • /openpm (Opens Police Menu)
    • image

  • Controls
    • F9 (Opens Police Menu)
    • Players can change the open menu function in their keybind settings.

Changing permissions

  • If you would like to allow players to use the menu, it is as easy as adding `add_ace identifier.ADDIDENTIFIERHERE policemenu.open allow #PLAYERNAME`
  • If you would like to allow players to use a loadout, it is as easy as adding `add_ace identifier.ADDIDENTIFIERHERE policemenu.LOADOUTNAME allow #PLAYERNAME`
  • server.cfg example


add_ace identifier.steam:1100001155f7f59 policemenu.open allow #John

add_ace identifier.steam:1100001155f7f59 policemenu.sru allow #John

You can also allow groups of players:


add_ace group.leo policemenu.open allow

add_ace group.sru policemenu.sru allow

Modifying Config

  • If you would like to add more weapons, simply add the name to the weapons>spawn portion. You can find a full list of weapons in the weapons.lua file.
  • If you would like to add more attachments, simply add the name of the weapon.attachment. For example: WEAPON_PISTOL.suppressor. You can find a full list of weapon attachments in the weapons.lua file.
  • Note: I tried my best to make it very straight forward for people that are new to development or have no idea what they are looking at. If you have questions don't be afraid to reach out!

Installation

  1. Download dpemotes here. This is a dependency, you need this for the Police Menu.
  2. Download johnspolicemenu here.
  3. Extract the folders and upload it to your FiveM server.
  4. Add the resources to your server.cfg file. (dpemotes before johnspolicemenu)

Credits

  • Thanks to BritishBrotherhood for the spikescripts script: Link
  • Thanks to Warxander for the menu api: Link
2 Likes

Suggestions

Add Ace Permissions instead of using Steam Hexes.

Add Sounds for when the user is cuffed

Give Users a Chance to escape being dragged or cuffed

2 Likes

Thanks for the suggestions. I really like those, I will add them to my list of features to add.

Sorry I’m stupid as hell. How do I add additional users to use the menu?

1 Like

You open the config.lua file which is located in the config folder when you download the script. Under Config.AccessList is where you add a new user. Here is an example (pulled from the config):

Config.Accesslist = {
	"steam:1100001155f7f59",   --John
	"Insert Steam Here (like example above)",   --NewPlayer
}
1 Like

hmm that’s what iv been doing but it doesn’t seem to be working. Its the steam HEX number right? is there anyway to turn off the permissions?

sorry for your time

1 Like

No worries man. I’m currently working on redoing the permission system to use Ace instead of the current system. I will add more documentation on the GitHub page on how to add players once the change is made.

2 Likes

Pushed update to the GitHub

1 Like

Now im more confused lol XD

1 Like

Hi, hoping you can help because this is driving me nuts. I added attachments to some guns in the loadouts but it doesn’t show them all but if I remove one or two then others show up or removing them completely still leaves them in the weapon wheel.
I did restart the game incase that was it but nope, any ideas? Thanks.

Also is there a way to make a person able to still move about when cuffed? Thanks.

1 Like

Can you send a screenshot of the attachments that are working and the attachments that are not working? As for the moving while cuffing, if you open the client.lua and search for HandleDrag(). Inside the function should be a native called TaskPlayAnim, change the number 16 to 32 and that should fix the player movability.

I’ll get them to you tomorrow, Thanks for the quick reply.

1 Like
		attachments = {
			WEAPON_SMG.flashlight,sight,suppressor,
			WEAPON_COMBATPISTOL.flashlight,
			WEAPON_CARBINERIFLE_MK2.rounds,flashlight,sight2,suppressor,barrel2,
			WEAPON_PUMPSHOTGUN.flashlight,
			WEAPON_PUMPSHOTGUN_MK2.sight,flashlight,
			WEAPON_SNIPERRIFLE.suppressor,sight2,
			WEAPON_HEAVYSNIPER_MK2.barrel2,suppressor,sight2,rounds2,

I couldn’t upload images, there must be a restriction that I don’t know about. So if you look at the Heavysniper you’ll see 4 items, but in game only two show, the scope and barrel. But if I remove one (can’t remember which one) I might lose an attachment or gain one.
Thanks.

Also i edited the 16 to 32 and now it doesn’t cuff. If you uncuff then the arms flinch for a second. Thanks.

Alright, I tested out your problem with the attachments. Try adding “WEAPON_WEAPONNAME.” before the other attachments. For example I wrote this example loadout:

["test"] = {
		name = "test Loadout",
		access = true,
		weapons = {
			spawn = {
				WEAPON_SMG,
				WEAPON_COMBATPISTOL,
				WEAPON_CARBINERIFLE_MK2,
				WEAPON_PUMPSHOTGUN,
				WEAPON_PUMPSHOTGUN_MK2,
				WEAPON_SNIPERRIFLE,
				WEAPON_HEAVYSNIPER_MK2
			},
			attachments = {
				WEAPON_SMG.flashlight,WEAPON_SMG.sight,WEAPON_SMG.suppressor,
				WEAPON_COMBATPISTOL.flashlight,
				WEAPON_CARBINERIFLE_MK2.rounds,WEAPON_CARBINERIFLE_MK2.flashlight,WEAPON_CARBINERIFLE_MK2.sight2,WEAPON_CARBINERIFLE_MK2.suppressor,WEAPON_CARBINERIFLE_MK2.barrel2,
				WEAPON_PUMPSHOTGUN.flashlight,
				WEAPON_PUMPSHOTGUN_MK2.sight,WEAPON_PUMPSHOTGUN_MK2.flashlight,
				WEAPON_SNIPERRIFLE.suppressor,WEAPON_SNIPERRIFLE.sight2,
				WEAPON_HEAVYSNIPER_MK2.barrel2,WEAPON_HEAVYSNIPER_MK2.suppressor,WEAPON_HEAVYSNIPER_MK2.sight2,WEAPON_HEAVYSNIPER_MK2.rounds2
			}
		},
	},

About the handcuffing issue, try 48 instead of the 16/32. Here is the link to the native that is used incase further documentation is needed: TaskPlayAnim - Natives @ Cfx.re Docs
The section that you are trying to change is the flag section.

Also one more thing. I noticed that the heavy sniper was not given ammo after the rounds change. I will release a fix for this soon (next 5 minutes probably). Please reach out if any of this doesn’t work for you and sorry for the delayed response :slight_smile:

Hi, no worries on the delayed replies. very grateful for a script like this.
The weapons work great now thanks but still no luck with the moving while cuffed. i did look at the link and thought I would try different numbers, some interesting results :smiley: but no luck.
Thanks.

Yea me too, how do we add players to have access? I added it in the config (probably incorrectly but I’m not home rn to send the config file), first when I joined it said I didn’t have access, then I added the ace add example thing with my steam Id and now when I press f9 nothing happens at all. The resource folder is running when I start the server. I’m 99% sure this is user error.

You no longer add player access in the config file. You need to do it in the server.cfg file. This is assuming that you have the latest version of the script downloaded though.

I added the permissions to the Server.cfg file, “add_ace identifier.steam:(steamid) policemenu.open allow #(mysteamname)” Before I added that, I pushed f9 in the server and it would say permission denied, after I added that it wouldn’t say or do anything when I pressed f9, and I didn’t switch the hotkey