[FREE][STANDALONE][ADD-ON] Standalone Add-on Airsoft Guns

Using ESX also and I got it working fine. It’s best to use an inventory system like ox_inventory, you’ll be able to create a new ammo type (BB Pellets) and set it in your weapons.lua.

but i use another iventory system any other way to create a new
ammo

After i use the airsoft i can not reload any normal gun how i can fix that?

can i change the time that the player ragdoll ?

Cant wait

Wait for next update

doing so would change the time the taser for is effective for as well

i dont thinks becouse you change the weapon.meta from WEAPON_CLOCK

and not from weapon_stungun

u able to send me your items file with them in

1 Like

U mean this? (ox_inventory) LEGACY 1.75
image

For qbcore

New update

Sadly I cannot get them to spawn at all by name as an admin.

I didn’t see this specifically stated for everywhere, what do I need to do for ammo type for QBCore? I’m inputting them into the weapons.lua and items.lua currently

I cant get them to work in my qbcore server i added them to the Items.lua and weapon.lua but when i try to spawn them it says item doesnt exist

What i added in Items.lua

	-- Airsoft Guns
	['WEAPON_AIRSOFTAK47'] 			 = {['name'] = 'WEAPON_AIRSOFTAK47', 		 	  	['label'] = 'AIRSOFT AK47', 				['weight'] = 1000, 		['type'] = 'weapon', 	['ammotype'] = 'AMMO_RIFLE',				['image'] = 'WEAPON_AIRSOFTAK47.png', 		['unique'] = true, 		['useable'] = false, 	['description'] = 'An airsoftgun'},
	['WEAPON_AIRSOFTGLOCK20'] 			 = {['name'] = 'WEAPON_AIRSOFTGLOCK20', 		 	  	['label'] = 'AIRSOFT GLOCK20', 				['weight'] = 1000, 		['type'] = 'weapon', 	['ammotype'] = 'AMMO_PISTOL',				['image'] = 'WEAPON_AIRSOFTGLOCK20.png', 		['unique'] = true, 		['useable'] = false, 	['description'] = 'An airsoftgun'},
	['WEAPON_AIRSOFTM4'] 			 = {['name'] = 'WEAPON_AIRSOFTM4', 		 	  	['label'] = 'AIRSOFT M4', 				['weight'] = 1000, 		['type'] = 'weapon', 	['ammotype'] = 'AMMO_RIFLE',				['image'] = 'WEAPON_AIRSOFTM4.png', 		['unique'] = true, 		['useable'] = false, 	['description'] = 'An airsoftgun'},
	['WEAPON_AIRSOFTM249'] 			 = {['name'] = 'WEAPON_AIRSOFTM249', 		 	  	['label'] = 'AIRSOFT M249', 				['weight'] = 1000, 		['type'] = 'weapon', 	['ammotype'] = 'AMMO_RIFLE',				['image'] = 'WEAPON_AIRSOFTM249.png', 		['unique'] = true, 		['useable'] = false, 	['description'] = 'An airsoftgun'},
	['WEAPON_AIRSOFTUZIMICRO'] 			 = {['name'] = 'WEAPON_AIRSOFTUZIMICRO', 		 	  	['label'] = 'AIRSOFT Uzi', 				['weight'] = 1000, 		['type'] = 'weapon', 	['ammotype'] = 'AMMO_SMG',				['image'] = 'WEAPON_AIRSOFTUZIMICRO.png', 		['unique'] = true, 		['useable'] = false, 	['description'] = 'An airsoftgun'},
	['WEAPON_AIRSOFTMP5'] 			 = {['name'] = 'WEAPON_AIRSOFTMP5', 		 	  	['label'] = 'AIRSOFT MP5', 				['weight'] = 1000, 		['type'] = 'weapon', 	['ammotype'] = 'AMMO_SMG',				['image'] = 'WEAPON_AIRSOFTMP5.png', 		['unique'] = true, 		['useable'] = false, 	['description'] = 'An airsoftgun'},
	['WEAPON_AIRSOFTR700'] 			 = {['name'] = 'WEAPON_AIRSOFTR700', 		 	  	['label'] = 'AIRSOFT R700', 				['weight'] = 1000, 		['type'] = 'weapon', 	['ammotype'] = 'AMMO_SNIPER',				['image'] = 'WEAPON_AIRSOFTR700.png', 		['unique'] = true, 		['useable'] = false, 	['description'] = 'An airsoftgun'},
	['WEAPON_AIRSOFTG36C'] 			 = {['name'] = 'WEAPON_AIRSOFTG36C', 		 	  	['label'] = 'AIRSOFT G36C', 				['weight'] = 1000, 		['type'] = 'weapon', 	['ammotype'] = 'AMMO_RIFLE',				['image'] = 'WEAPON_AIRSOFTG36C.png', 		['unique'] = true, 		['useable'] = false, 	['description'] = 'An airsoftgun'},
	['WEAPON_AIRSOFTR870'] 			 = {['name'] = 'WEAPON_AIRSOFTR870', 		 	  	['label'] = 'AIRSOFT R870', 				['weight'] = 1000, 		['type'] = 'weapon', 	['ammotype'] = 'AMMO_SHOTGUN',				['image'] = 'WEAPON_AIRSOFTR870.png', 		['unique'] = true, 		['useable'] = false, 	['description'] = 'An airsoftgun'},
		
2 Likes

Nevermind, just made it work on QB-Core

For anyone having trouble adding this to QB-Core:
Add this code to qb-core\shared\items.lua:

 -- Airsoft
	['weapon_airsoftak47']			= {['name'] = 'weapon_airsoftak47',			['label'] = 'AirSoft AK47',			['weight'] = 1000,		['type'] = 'weapon',		['ammotype'] = 'AMMO_SMG',		['image'] = 'airsoftak47.png',			['unique'] = true,		['useable'] = true,		['description'] = 'Airsoft AK47'},
	['weapon_airsoftg36c']			= {['name'] = 'weapon_airsoftg36c',			['label'] = 'AirSoft G36C',			['weight'] = 1000,		['type'] = 'weapon',		['ammotype'] = 'AMMO_SMG',		['image'] = 'airsoftg36c.png',			['unique'] = true,		['useable'] = true,		['description'] = 'Airsoft G36C'},
	['weapon_airsoftglock20']		= {['name'] = 'weapon_airsoftglock20',		['label'] = 'AirSoft Glock 20',		['weight'] = 1000,		['type'] = 'weapon',		['ammotype'] = 'AMMO_SMG',		['image'] = 'airsoftglock20.png',		['unique'] = true,		['useable'] = true,		['description'] = 'Airsoft Glock 20'},
	['weapon_airsoftm4']			= {['name'] = 'weapon_airsoftm4',			['label'] = 'AirSoft M4',			['weight'] = 1000,		['type'] = 'weapon',		['ammotype'] = 'AMMO_SMG',		['image'] = 'airsoftm4.png',			['unique'] = true,		['useable'] = true,		['description'] = 'Airsoft M4'},
	['weapon_airsoftm249']			= {['name'] = 'weapon_airsoftm249',			['label'] = 'AirSoft M249',			['weight'] = 1000,		['type'] = 'weapon',		['ammotype'] = 'AMMO_SMG',		['image'] = 'airsoftm249.png',			['unique'] = true,		['useable'] = true,		['description'] = 'Airsoft M249'},
	['weapon_airsoftmicrouzi']		= {['name'] = 'weapon_airsoftmicrouzi',		['label'] = 'AirSoft Micro Uzi',	['weight'] = 1000,		['type'] = 'weapon',		['ammotype'] = 'AMMO_SMG',		['image'] = 'airsoftmicrouzi.png',		['unique'] = true,		['useable'] = true,		['description'] = 'Airsoft Micro Uzi'},
	['weapon_airsoftmp5']			= {['name'] = 'weapon_airsoftmp5',			['label'] = 'AirSoft MP5',			['weight'] = 1000,		['type'] = 'weapon',		['ammotype'] = 'AMMO_SMG',		['image'] = 'airsoftmp5.png',			['unique'] = true,		['useable'] = true,		['description'] = 'Airsoft MP5'},
	['weapon_airsoftr700']			= {['name'] = 'weapon_airsoftr700',			['label'] = 'AirSoft R700',			['weight'] = 1000,		['type'] = 'weapon',		['ammotype'] = 'AMMO_SMG',		['image'] = 'airsoftr700.png',			['unique'] = true,		['useable'] = true,		['description'] = 'Airsoft R700'},
	['weapon_airsoftr870']			= {['name'] = 'weapon_airsoftr870',			['label'] = 'AirSoft R870',			['weight'] = 1000,		['type'] = 'weapon',		['ammotype'] = 'AMMO_SMG',		['image'] = 'airsoftr870.png',			['unique'] = true,		['useable'] = true,		['description'] = 'Airsoft R870'},

Add this to qb-core\shared\weapons.lua:

-- Airsoft
	[`weapon_airsoftak47`]			 = {['name'] = 'weapon_airsoftak47',		['label'] = 'AirSoft AK47',			['weapontype'] = 'Assault Rifle',		['ammotype'] = 'AMMO_SMG',	['damagereason'] = 'Tagged'},
	[`weapon_airsoftg36c`]			 = {['name'] = 'weapon_airsoftg36c',		['label'] = 'AirSoft G36C',			['weapontype'] = 'Assault Rifle',		['ammotype'] = 'AMMO_SMG',	['damagereason'] = 'Tagged'},
	[`weapon_airsoftglock20`]		 = {['name'] = 'weapon_airsoftglock20',		['label'] = 'AirSoft Glock 20',		['weapontype'] = 'Pistol',				['ammotype'] = 'AMMO_SMG',	['damagereason'] = 'Tagged'},
	[`weapon_airsoftm4`]		 	 = {['name'] = 'weapon_airsoftm4',			['label'] = 'AirSoft M4',			['weapontype'] = 'Assault Rifle',		['ammotype'] = 'AMMO_SMG',	['damagereason'] = 'Tagged'},
	[`weapon_airsoftm249`]		 	 = {['name'] = 'weapon_airsoftm249',		['label'] = 'AirSoft M249',			['weapontype'] = 'Light Machine Gun',	['ammotype'] = 'AMMO_SMG',	['damagereason'] = 'Tagged'},
	[`weapon_airsoftmicrouzi`]	 	 = {['name'] = 'weapon_airsoftmicrouzi',	['label'] = 'AirSoft Micro Uzi',	['weapontype'] = 'Sub Machine Gun',		['ammotype'] = 'AMMO_SMG',	['damagereason'] = 'Tagged'},
	[`weapon_airsoftmp5`]		 	 = {['name'] = 'weapon_airsoftmp5',			['label'] = 'AirSoft MP5',			['weapontype'] = 'Sub Machine Gun',		['ammotype'] = 'AMMO_SMG',	['damagereason'] = 'Tagged'},
	[`weapon_airsoftr700`]		 	 = {['name'] = 'weapon_airsoftr700',		['label'] = 'AirSoft R700',			['weapontype'] = 'Shotgun',				['ammotype'] = 'AMMO_SMG',	['damagereason'] = 'Tagged'},
	[`weapon_airsoftr870`]		 	 = {['name'] = 'weapon_airsoftr870',		['label'] = 'AirSoft R870',			['weapontype'] = 'Shotgun',				['ammotype'] = 'AMMO_SMG',	['damagereason'] = 'Tagged'},

Add these images to your Inventory script:
AirSoft_Weap_Imgs.zip (47.6 KB)

Have fun

2 Likes

Me and a buddy have created a easy to use ammo system for this airsoft script where you use a bbammo item instead of SMG ammo (yes it still add the proper ammo and has been tested back and forth)
Make sure to read the readme.md to know what you have to do to make it work.
plexy_bbammo.zip (16.5 KB)

1 Like

With the custom ammo change how would I add ammo for the guns if I don’t use ox inventory for ESX? I am confused on this part this is my first time learning how to add add-on weapons to my server and I got the guns added just fine so far.

Do you have the rest already :smiley: