Jump to content

Custom WEAPON model+texture


Atti

Recommended Posts

Can I do something like this?

I'm really a n00b of modding in gta, as 'modelid' (see http://development.mtasa.com/index.php?title=EngineImportTXD) should i give the weaponid, i.e. 24 for deagle?

EDIT: Found in weapon.dat (i.e. 348 for the deagle)

EDIT2: I would already know if I actualli can :oops:

EDIT3: FInally, it not seems to work:

  
function GsetupWeaponSelection() 
    [...] 
    setTimer( loadModifiedKatana, 1000, 1 ) 
end 
  
addEventHandler("onClientResourceStart", getResourceRootElement(Cresource), GsetupWeaponSelection) 
  
function loadModifiedKatana() 
    txd = engineLoadTXD ( "weaponz/katana.txd" ) 
    if txd then outputChatBox ( "> succesfully loaded katana txd" ) end 
    engineImportTXD ( txd, 339 ) 
    dff = engineLoadDFF ( "weaponz/katana.dff", 0 ) 
    if txd then outputChatBox ( "> succesfully loaded katana dff" ) end 
    engineReplaceModel ( dff, 339 ) 
    outputChatBox ( "> replacing the katana models" ) 
end 
  

In chatbox it appears "succesfully loaded blah", but it doesn't seems to really replace dff or txd.

EDIT4: "This function replaces the given model in the given model ID with the DFF file passed. This function supports vehicles and objects at the moment."

Sorry again, a mod can close. :P

Edited by Guest
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...