[Release] [Updated 2/19/19] Object Spawner v3


Simple object spawner to spawn a barrier and cone.

“/cone” - Spawn Cone
“/barrier” - Spawn Barrier (Player Rotation)
“/ro” - Deletes Object (Stand Close)

ObjectSpawner.zip (1.2 KB)

NOTE: I do not know if this will work for VRP or ESX I know nothing of those frameworks.

Updated (7/20/2018) : Added ped restriction and fixed a couple bugs.

Object Spawner v2:
This version now uses NativeUI by Frazzle. (Not Included)
Added custom coroner stretcher.

ObjectSpawnerv2.zip (1.4 MB)

Object Spawner v3:
There currently is no permissions to use the menu. (Will be updated soon with ACE perms)
Default key is F6.
This version is now written in C# for better performance.
Menu is now using MenuAPI by @Vespura.
Added Message Board by @SebastienGaming.
All credits are included in the source.

Source code and compiled version included!

Download Version 3

[HELP] Prop Spawning ( NOT MAPS )

Nice release dude. [20 char]


Why not use the police barrier?


The police barrier I’ve had issues with so I left it out for now until I can get it fixed.
But if you would like to add it for your own use the object name is “prop_barrier_work05”.


What were the problems?


It kept falling through the map and wouldn’t spawn properly. It may be something on my end.


Is this only for the cop? or can a normal citezen also spawn it?


Anyone can use it. I’ll add another version soon so that only an LEO can use it.


That would be Nice if the only police og Medic can do it :slight_smile:


Otherwise you look at how the code is made and integrate it into your :heart_eyes:


I just downloaded this and put into my server to test it, but the cones and barriers aren’t spawning. And yes it’s in the resource folder and started, Because the commands show up.


Same problem.



I had to take a server.lua from a similar resource and edit it a bit to make this one work.


I apologize for the problems this script has caused. This new update SHOULD fix those problems! If you are still having any problems please let me know so I can fix them. :muscle:


New update, Check it out!


How do you open the Menu?


The default button is “E”.

If you would like to change the button just go here to find a button:

Change " IsControlJustPressed(1, 51) "
51 = E


Thank you very much. I was just being a noob and had not added the dependency :stuck_out_tongue:


Hi. Is it possible to add options to get it to stick to the server, even if it’s reloaded? A json file or something to hold the cords for the item.


I’ve added this to my Policejob and EMS Menu with the help of Alpha on the discord.

To the menu I added

{label = _U('object22'), value = 'object22'},

and put -- infront of the old spawner.


		title    = 'Police',
		align    = 'bottom-right',
		elements = {
			{label = _U('citizen_interaction'),	value = 'citizen_interaction'},
			{label = _U('vehicle_interaction'),	value = 'vehicle_interaction'},
			--{label = _U('object_spawner'),		value = 'object_spawner'},
			{label = _U('object22'),		    value = 'object22'},


		title		= _U('ambulance'),
		align		= 'bottom-right',
		elements	= {
			{label = _U('ems_menu'), value = 'citizen_interaction'}
			{label = _U('object22'),	value = 'object22'},

then I added this to it as well to trigger it when the menu selects it.


		elseif data.current.value == 'object22' then

ambulancejob was different it needs to go above the citizen_interaction menu like this and change the if to elseif at the start of if data.current.value == 'citizen_interaction' then

	}, function(data, menu)

		if data.current.value == 'object22' then
		elseif data.current.value == 'citizen_interaction' then

In Objectspawnerv2/client.lua I replaced this

    while true do
        if IsControlJustPressed(1, 51) then
            mainMenu:Visible(not mainMenu:Visible())

With this

AddEventHandler("objectmenuv2", function()
    mainMenu:Visible(not mainMenu:Visible())

    while true do

This should allow you to use them in your policejob and ems menus.

I did also change the allowed peds

pedsList = {

But that was just for how I needed it set up.

And of course add the locales to the language.lua you are using in this case

  ['object22'] = 'Object Selection Menu',