How to add Custom weapons?

fivem
fivem-scripts
help
fxserver
custom

#1

I Need help on how to add Custom weapons to a Fivem FX Server , I Looked everywhere and there are no guides on how to add custom weapons . Please help , Also if you have any suggested files i should add to my server because i really need scripts and Uniforms . Thank you .


#2

Stream them like you would stream cars…


#3

but when i stream them in the __resoure.lua , What do i change ‘vehicle_names.lua’ to . ?
What do i need to edit to this ?

resource_manifest_version ‘77731fab-63ca-442c-a67b-abc70f28dfa5’

files {
’’
}

data_file ‘’ ‘’

client_scripts ‘vehicle_names.lua’


#4

Whether or not you actually require a similar file depends on if the weapon you’re trying to stream is an add-on weapon with language files or not. Do the weapons that you want to stream only contain a few files that end in .ytd and .ydr?

Which weapon specifically are you trying to stream?


#5

you don’t have to change the name of the lua file, veihcle_names.lua can remain the same with different coding, and it will have the functions that are in the coding, name does not matter


#6

Yes they contain only files with .ytd .and .ydr


#7

what do you do with template vehicles ? ones with pictures like .png and .jpg


#8

Do they replace current weapons? If so, all you need to do is create a resource with a blank __resource.lua containing the manifest version and then place your .ytd and .ydr files in a folder named “stream” inside of your resource folder.


#9

unless if has customized meta files for the gun


#10

your talking about weapons and cars, I’m a bit confused?


#11

If you are talking about cars, refer to my tutorial: [How-To] Add-on Vehicles (Detailed)


#12

He’s trying to figure out how to stream weapons based off of this post.

However the weapons he would like to stream do not contain custom meta files, so that’s where he’s stuck.


#13

I’m sure you can do

files{
             'weapons.meta'
}

But I’m not too sure if anyone has found the data file for weapons meta. For example
data_file 'HANDLING_FILE' 'handling.meta'


#14

Well now i need help on How to add Replace / addon cars to fivem server , But they mostly have like Templates that are Pictures and i dont know if u need to code them into the __resource.lua or put them in the stream file .


#15

You have to add textures in the .ytd files using OpenIV


#18

I’ve been able to stream replacement weapons by putting the ytd and ydr files in the stream folder. There’s a huge issue though. Whenever I see an NPC shooting one of the modded weapons it causes some of my weapons to start animating in a weird way. Sometimes it animates weirdly for the NPC as well. Does anyone know what that’s about?