bosslorenz Posted June 30, 2015 Share Posted June 30, 2015 --Client lua function replaceWeapon() local txd = engineLoadTXD("weapons/ak47.txd", true) engineImportTXD(txd, 355) local dff = engineLoadDFF("weapons/ak47.dff", 355) engineReplaceModel(dff, 355) end addEventHandler("onClientResourceStart", resourceRoot, replaceWeapon) Meta.xml No error in debug but it seems it keeps on the original texture of it. Link to comment
tuaos Posted June 30, 2015 Share Posted June 30, 2015 --Client lua function replaceWeapon() local txd = engineLoadTXD("weapons/ak47.txd", true) engineImportTXD(txd, 355) local dff = engineLoadDFF("weapons/ak47.dff", 355) engineReplaceModel(dff, 355) end addEventHandler("onClientResourceStart", resourceRoot, replaceWeapon) Meta.xml No error in debug but it seems it keeps on the original texture of it. function replaceWeapon() local txd = engineLoadTXD("weapons/ak47.txd", true) engineImportTXD(txd, 355) local dff = engineLoadDFF("weapons/ak47.dff") engineReplaceModel(dff, 355) end addEventHandler("onClientResourceStart", resourceRoot, replaceWeapon) Meta.xml Link to comment
bosslorenz Posted June 30, 2015 Author Share Posted June 30, 2015 Folder RPG ( meta.xml) RPG > (ZombieRPG)Weapons > weapons > (ak47.txd,ak47.dff) RPG > (ZombieRPG)Weapons > (weaponreplace-c.lua) Thats my folder. You gave me wrong meta.xml. It can no longer locate the file path/ script path. My meta.xml is not on the same folder as the weaponreplace-c.lua. Link to comment
tuaos Posted June 30, 2015 Share Posted June 30, 2015 then you have to mention the location on lua too. (ZombieRPG)Weapons/weapons/ak47.txd,(ZombieRPG)Weapons/weapons/ak47.dff function replaceWeapon() local txd = engineLoadTXD("(ZombieRPG)Weapons/weapons/ak47.txd", true) engineImportTXD(txd, 355) local dff = engineLoadDFF("(ZombieRPG)Weapons/weapons/ak47.dff") engineReplaceModel(dff, 355) end addEventHandler("onClientResourceStart", resourceRoot, replaceWeapon) Meta.xml put that lua where meta.xml is located Link to comment
bosslorenz Posted June 30, 2015 Author Share Posted June 30, 2015 Thanks, thats just my mistake, file src is the same as I should put in engineLoadTXD and engineLoadDFF . Thanks. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now