FiveM Modding Tutorial
Hello there! Just lately i launched a tutorial on stream add-on melee weapons (which will be discovered right here)
As we speak I’ll present you merely the way to stream the names in your add-on weapons.
Step 1. Create a brand new useful resource folder and make a __resource.lua file
Step 2. Create a LUA file named “consumer.lua” and reference it within the __resource as so:
Be aware: the manifest model isn’t wanted
Step 3: in consumer.lua use this script:
Citizen.CreateThread(perform() AddTextEntry(WT_WEAPONNAME, 'NAME YOU DESIRE') finish)
To get the WT_WEAPONNAME, go to the weapons.meta of the weapon you need to stream the identify for and seek for HumanNameHash (ex. for the Katana, i put WT_KATANA)
It would be best to copy what’s there, and put it within the consumer.lua because the WT_WEAPONNAME
Ex. for my katana, that is how i’ve the code:
Citizen.CreateThread(perform() AddTextEntry('WT_KATANA', 'Katana bby') finish)
That is the way it takes care of we load the useful resource:
Hope this helps out a few of you who need to stream addon weapons and wish the names. The clean spot bothered me
Nonetheless tweaking out issues for add-on weapons, but it surely’s doable!
Thanks for taking the time to learn.
EDIT: Don’t want the WeaponIsValid native.
Authentic supply: https://discussion board.cfx.re/t/how-to-add-names-to-custom-weapons/253053