Hi there! Recently i released a tutorial on stream add-on melee weapons (which can be found here)
Today I’ll show you simply how to stream the names for your add-on weapons.
Step 1. Create a new resource folder and make a __resource.lua file
Step 2. Create a LUA file named “client.lua” and reference it in the __resource as so:
Note: the manifest version is not needed
Step 3: in client.lua use this script:
Citizen.CreateThread(function()
AddTextEntry(WT_WEAPONNAME, 'NAME YOU DESIRE')
end)
To get the WT_WEAPONNAME, go to the weapons.meta of the weapon you want to stream the name for and search for HumanNameHash (ex. for the Katana, i put WT_KATANA)
You will want to copy what is there, and put it in the client.lua as the WT_WEAPONNAME
Ex. for my katana, this is how i have the code:
Citizen.CreateThread(function()
AddTextEntry('WT_KATANA', 'Katana bby')
end)
This is how it looks after we load the resource:
Hope this helps out some of you who want to stream addon weapons and want the names. The blank spot bothered me
Still tweaking out things for add-on guns, but it’s possible!
Thank you for taking the time to read.
EDIT: Don’t need the WeaponIsValid native.