Jump to content

Weapon skin replace [HELP]


bosslorenz

Recommended Posts

--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
--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

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

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

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...