[Release] [RedM] Weapon Shop (guns & ammo)

Hey guys,

Here is my take on a weapon shop on RedM, let me know if you like it (improvement ideas welcome).

REDEM:RP Version:
rsg_weaponshop.zip (10.1 KB)

VORP Version:
NIL

Required resources:

Installation:
unzip and add “rsg_weaponshop” to your resources folder
add the start commands to your server.cfg :

ensure rsg_weaponshop

In redemrp_inventory/config.lua under Config.Items ensure the items are added:

-- start of config

Config.Items = {

-- revolvers

["WEAPON_REVOLVER_CATTLEMAN"] =
	{
		label = "Cattleman Revolver",
		description = "A popular and classic sidearm, the Buck Cattleman is a great all-around revolver",
		weight = 0.4,
		canBeDropped = true,
		requireLvl = 1,
		weaponHash = GetHashKey("WEAPON_REVOLVER_CATTLEMAN"),
		  imgsrc = "items/WEAPON_REVOLVER_CATTLEMAN.png",
		type = "item_weapon"
	},
	
["WEAPON_REVOLVER_LEMAT"] =
	{
		label = "LeMat Revolver",
		description = "I think its french, it does go bang!",
		weight = 0.9,
		canBeDropped = true,
		requireLvl = 1,
		weaponHash = GetHashKey("WEAPON_REVOLVER_LEMAT"),
		  imgsrc = "items/WEAPON_REVOLVER_LEMAT.png",
		type = "item_weapon"
	},
	
["WEAPON_REVOLVER_SCHOFIELD"] =
	{
		label = "Revolver Schofield",
		description = "Great for prison breaks",
		weight = 0.7,
		canBeDropped = true,
		requireLvl = 9,
		weaponHash = GetHashKey("WEAPON_REVOLVER_SCHOFIELD"),
		  imgsrc = "items/WEAPON_REVOLVER_SCHOFIELD.png",
		type = "item_weapon"
	},
	
["WEAPON_REVOLVER_DOUBLEACTION"] =
	{
		label = "Double Action Revolver",
		description = "Double the action, same weight.",
		weight = 0.8,
		canBeDropped = true,
		requireLvl = 17,
		weaponHash = GetHashKey("WEAPON_REVOLVER_DOUBLEACTION"),
		  imgsrc = "items/WEAPON_REVOLVER_DOUBLEACTION.png",
		type = "item_weapon"
	},
	
["WEAPON_REVOLVER_DOUBLEACTION_GAMBLER"] =
	{
		label = "High Roller Double-Action Revolver",
		description = "Dont forget to lock...",
		weight = 0.8,
		canBeDropped = true,
		requireLvl = 17,
		weaponHash = GetHashKey("WEAPON_REVOLVER_DOUBLEACTION_GAMBLER"),
		  imgsrc = "items/WEAPON_REVOLVER_DOUBLEACTION.png",
		type = "item_weapon"
	},

-- pistols

["WEAPON_PISTOL_VOLCANIC"] =
	{
		label = "Pistol Volcanic",
		description = "WARNING: Does not shoot lava",
		weight = 0.7,
		canBeDropped = true,
		requireLvl = 21,
		weaponHash = GetHashKey("WEAPON_PISTOL_VOLCANIC"),
		  imgsrc = "items/WEAPON_PISTOL_VOLCANIC.png",
		type = "item_weapon"
	},
	
["WEAPON_PISTOL_SEMIAUTO"] =
	{
		label = "Pistol Semi-Automatic",
		description = "Goes bang more then once",
		weight = 0.6,
		canBeDropped = true,
		requireLvl = 22,
		weaponHash = GetHashKey("WEAPON_PISTOL_SEMIAUTO"),
		  imgsrc = "items/WEAPON_PISTOL_SEMIAUTO.png",
		type = "item_weapon"
	},
	
["WEAPON_PISTOL_MAUSER"] =
	{
		label = "Pistol Mauser",
		description = "A must for any advanced warfare",
		weight = 0.6,
		canBeDropped = true,
		requireLvl = 34,
		weaponHash = GetHashKey("WEAPON_PISTOL_MAUSER"),
		  imgsrc = "items/WEAPON_PISTOL_MAUSER.png",
		type = "item_weapon"
	},

-- rifles

["WEAPON_REPEATER_EVANS"] =
	{
		label = "Repeater Evans",
		description = "A feat in weapon mechanics",
		weight = 2.5,
		canBeDropped = true,
		requireLvl = 1,
		weaponHash = GetHashKey("WEAPON_REPEATER_EVANS"),
		  imgsrc = "items/WEAPON_REPEATER_EVANS.png",
		type = "item_weapon"
	},
	
["WEAPON_RIFLE_BOLTACTION"] =
	{
		label = "Bolt Action Rifle",
		description = "Jams a lot, but works well when it doesnt.",
		weight = 2.3,
		canBeDropped = true,
		requireLvl = 7,
		weaponHash = GetHashKey("WEAPON_RIFLE_BOLTACTION"),
		  imgsrc = "items/WEAPON_RIFLE_BOLTACTION.png",
		type = "item_weapon"
	},
	
["WEAPON_RIFLE_VARMINT"] =
	{
		label = "Varmint Rifle",
		description = "Ride & Shoot!",
		weight = 1.5,
		canBeDropped = true,
		requireLvl = 8,
		weaponHash = GetHashKey("WEAPON_RIFLE_VARMINT"),
		  imgsrc = "items/WEAPON_RIFLE_VARMINT.png",
		type = "item_weapon"
	},
	
["WEAPON_SNIPERRIFLE_ROLLINGBLOCK"] =
	{
		label = "Rolling Block Rifle",
		description = "Line em up 500 metres away!",
		weight = 4.0,
		canBeDropped = true,
		requireLvl = 13,
		weaponHash = GetHashKey("WEAPON_SNIPERRIFLE_ROLLINGBLOCK"),
		  imgsrc = "items/WEAPON_SNIPERRIFLE_ROLLINGBLOCK.png",
		type = "item_weapon"
	},
	
["WEAPON_RIFLE_SPRINGFIELD"] =
	{
		label = "Springfield Rifle",
		description = "Military standard",
		weight = 2.0,
		canBeDropped = true,
		requireLvl = 38,
		weaponHash = GetHashKey("WEAPON_RIFLE_SPRINGFIELD"),
		  imgsrc = "items/WEAPON_RIFLE_SPRINGFIELD.png",
		type = "item_weapon"
	},
	
["WEAPON_SNIPERRIFLE_CARCANO"] =
	{
		label = "Carcano Rifle",
		description = "Range is the key!",
		weight = 4.0,
		canBeDropped = true,
		requireLvl = 50,
		weaponHash = GetHashKey("WEAPON_SNIPERRIFLE_CARCANO"),
		  imgsrc = "items/WEAPON_SNIPERRIFLE_CARCANO.png",
		type = "item_weapon"
	},
	
-- shotguns

["WEAPON_SHOTGUN_PUMP"] =
	{
		label = "Pump-Action Shotgun",
		description = "Pump-Action Shotgun",
		weight = 2.5,
		canBeDropped = true,
		requireLvl = 5,
		weaponHash = GetHashKey("WEAPON_SHOTGUN_PUMP"),
		  imgsrc = "items/WEAPON_SHOTGUN_PUMP.png",
		type = "item_weapon"
	},
	
["WEAPON_SHOTGUN_REPEATING"] =
	{
		label = "Repeating Shotgun",
		description = "Repeating Shotgun",
		weight = 2.0,
		canBeDropped = true,
		requireLvl = 11,
		weaponHash = GetHashKey("WEAPON_SHOTGUN_REPEATING"),
		  imgsrc = "items/WEAPON_SHOTGUN_REPEATING.png",
		type = "item_weapon"
	},

["WEAPON_SHOTGUN_SAWEDOFF"] =
	{
		label = "Sawed-Off Shotgun",
		description = "Sawed-Off Shotgun",
		weight = 1.2,
		canBeDropped = true,
		requireLvl = 19,
		weaponHash = GetHashKey("WEAPON_SHOTGUN_SAWEDOFF"),
		  imgsrc = "items/WEAPON_SHOTGUN_SAWEDOFF.png",
		type = "item_weapon"
	},
	
["WEAPON_SHOTGUN_DOUBLEBARREL"] =
	{
		label = "Double-Barreled Shotgun",
		description = "Double-Barreled Shotgun",
		weight = 3.0,
		canBeDropped = true,
		requireLvl = 30,
		weaponHash = GetHashKey("WEAPON_SHOTGUN_DOUBLEBARREL"),
		  imgsrc = "items/WEAPON_SHOTGUN_DOUBLEBARREL.png",
		type = "item_weapon"
	},
	
["WEAPON_SHOTGUN_SEMIAUTO"] =
	{
		label = "Semi-Auto Shotgun",
		description = "Semi-Auto Shotgun",
		weight = 2.2,
		canBeDropped = true,
		requireLvl = 42,
		weaponHash = GetHashKey("WEAPON_SHOTGUN_SEMIAUTO"),
		  imgsrc = "items/WEAPON_SHOTGUN_SEMIAUTO.png",
		type = "item_weapon"
	},

-- ammo 

["revolver_ammo"] = {
		label = "Revolver Ammo",
		description = "Revlover Ammo",
		weight = 0.02,
		canBeDropped = true,
		canBeUsed = true,
		requireLvl = 1,
		limit = 10,
		imgsrc = "items/revolver_ammo.png",
		type = "item_standard"
	},

["pistol_ammo"] = {
		label = "Pistol Ammo",
		description = "Pistol Ammo",
		weight = 0.02,
		canBeDropped = true,
		canBeUsed = true,
		requireLvl = 1,
		limit = 10,
		imgsrc = "items/pistol_ammo.png",
		type = "item_standard"
	},

["rifle_ammo"] = {
		label = "Rifle Ammo",
		description = "Rifle Ammo",
		weight = 0.02,
		canBeDropped = true,
		canBeUsed = true,
		requireLvl = 1,
		limit = 10,
		imgsrc = "items/rifle_ammo.png",
		type = "item_standard"
	},
	
["repeater_ammo"] = {
		label = "Repeater Ammo",
		description = "Repeater Ammo",
		weight = 0.02,
		canBeDropped = true,
		canBeUsed = true,
		requireLvl = 1,
		limit = 10,
		imgsrc = "items/repeater_ammo.png",
		type = "item_standard"
	},
	
["shotgun_ammo"] = {
		label = "Shotgun Ammo",
		description = "Shotgun Ammo",
		weight = 0.02,
		canBeDropped = true,
		canBeUsed = true,
		requireLvl = 1,
		limit = 10,
		imgsrc = "items/shotgun_ammo.png",
		type = "item_standard"
	},
	
}
-- end of config

restart your server

Hope you enjoy…
RexshackGaming

1 Like

so… it is in my server i can open menu spend money but gives me no gun

hmmm @davidblack sent you a msg

i like it works like a charm thank you for this if you are using a dedicated server from zap make sure you go into your resource area an turn off auto overwrite or this will not work you will save yourself a lot of headache thankfully the guy that created this a super helpful joined my discord and guided me through fixing it

1 Like

Doesn’t give items only takes money

have you followed the information in the readme and added the items to your inventory

Yes I have

sir ,

i lost my weapon when i re-join the server…

cant sync with SQL…?

not able to check as have an issue with RDR atm / are they in your inventory? if so move them “use”

checked and this issue can not be replicated on my test or production / make sure that the inventory items in the README are added to your redemrp_inventory/config.lua under Config.Items

We have tried to get this to work, we get to the point that it will take money but does not give weapons or ammo.

Does this work with the new rp inven, or does someone know how to help me out

Okay at this point I’ve got it set so we receive weapons. Still unable to get it to give ammo if any help on this, this would be greatly helpful!

when you buy ammo from the store to reload your weapon you move the ammo to the USE box and it will reload the weapon

Thank you much for getting back to me. I understand and know that you need to move the weapon ammo up to use. The problem is when I click on the ammo I get errors and no ammo appears in inventory.

have you added the ammo to your inventory config file?

– ammo

["revolver_ammo"] = {
		label = "Revolver Ammo",
		description = "Revlover Ammo",
		weight = 0.02,
		canBeDropped = true,
		canBeUsed = true,
		requireLvl = 1,
		limit = 10,
		imgsrc = "items/ammo_bullet_normal.png",
		type = "item_standard"
	},

["pistol_ammo"] = {
		label = "Pistol Ammo",
		description = "Pistol Ammo",
		weight = 0.02,
		canBeDropped = true,
		canBeUsed = true,
		requireLvl = 1,
		limit = 10,
		imgsrc = "items/ammo_bullet_normal.png",
		type = "item_standard"
	},

["rifle_ammo"] = {
		label = "Rifle Ammo",
		description = "Rifle Ammo",
		weight = 0.02,
		canBeDropped = true,
		canBeUsed = true,
		requireLvl = 1,
		limit = 10,
		imgsrc = "items/ammo_bullet_normal.png",
		type = "item_standard"
	},
	
["repeater_ammo"] = {
		label = "Repeater Ammo",
		description = "Repeater Ammo",
		weight = 0.02,
		canBeDropped = true,
		canBeUsed = true,
		requireLvl = 1,
		limit = 10,
		imgsrc = "items/ammo_bullet_normal.png",
		type = "item_standard"
	},
	
["shotgun_ammo"] = {
		label = "Shotgun Ammo",
		description = "Shotgun Ammo",
		weight = 0.02,
		canBeDropped = true,
		canBeUsed = true,
		requireLvl = 1,
		limit = 10,
		imgsrc = "items/ammo_shotgun.png",
		type = "item_standard"
	},

Yes I have added that to the inventory config. Very sorry I’m not at my PC right now or I would send you the errors. Again thank you for getting back to me, I will post errors when I get home from work.

also check to see if you have double entries in you inventory config file, sometimes that causes issues

This is that same thing that happens to me, able to purchase everything but doesn’t give me anything. and it is taking my money.

Did anyone figure out the ammo not working since we also are having the same issue?

I got this all working, issue I am having is, the weapon doesn’t save in inventory after you quit. When you log back in, it is no longer there. Only weapons.