Jump to content

DayZ HOW TO ADD NEW WEAPONS ?


Recommended Posts

Hi everyone. I am posting this one because I want someone to teach me or show me tutorials on how to add new weapons on your mta DayZ server ? Can anyone developer helps me ?

 

 Like m4 I want to add new weapons between m4 and add new weapons s like M4 A3 Diablo but the M4, one still there.. I want to add a lot of weapons and can anyone tell me ? Or show me tutorials ?? Sorry for my English grammar.. I am new on this and didn't know anything ?

Link to comment
  • MTA Anti-Cheat Team

Just get the mods from the source (dff and txd files) and use this script to replace default weapons with mod: (clientside)

function replaceWeapon() 
txd = engineLoadTXD ( "m4.txd" )
engineImportTXD ( txd, 356)
dff = engineLoadDFF ( "m4.dff", 356) -- use weapon model ID, not weapon ID (model ID from https://wiki.multitheftauto.com/wiki/Weapons)
engineReplaceModel ( dff, 356) -- Likewise, model ID, for M4 as example it's 356

end
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceWeapon)

Example code, change into your dff/txd mod file names and change model ID to weapon you're replacing.

Edited by Dutchman101
  • Like 1
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...