Jump to content

[HELP]Replace Weapon


Recommended Posts

No.

You must put the weapon's world object ID into the object part which can be found from Map Editor by searching for "M4" or "Colt" or so.

I also prefer this:

addEventHandler("onClientResourceStart", resourceRoot, 
     function() 
          -- code 
     end 
) 

Or just leave the event off and only put the functions in the file, works.

Link to comment
No.

You must put the weapon's world object ID into the object part which can be found from Map Editor by searching for "M4" or "Colt" or so.

I also prefer this:

addEventHandler("onClientResourceStart", resourceRoot, 
     function() 
          -- code 
     end 
) 

Or just leave the event off and only put the functions in the file, works.

thnx dude you know Armor ID to replace?

Link to comment

JokeR,

- You know how to program in Lua? I guess not.

- You know the MTA Wiki? I guess not.

Solidsnake sent to you the functions. Why don't you read the Wiki and learn how to use the functions? Did you know that you can find the Weapon ID's on MTA Wiki?

We will not program for you. We will not work for you. If you want make something, go learn Lua. Is the better way. ;)

Link to comment
JokeR,

- You know how to program in Lua? I guess not.

- You know the MTA Wiki? I guess not.

Solidsnake sent to you the functions. Why don't you read the Wiki and learn how to use the functions? Did you know that you can find the Weapon ID's on MTA Wiki?

We will not program for you. We will not work for you. If you want make something, go learn Lua. Is the better way. ;)

I say i do it but don't know ID of ammo and can't find in wiki

Link to comment
  • 1 year later...

  
function applyMods() 
    local skin = engineLoadTXD("m4.txd", true) 
    engineImportTXD(skin, 356) 
    local skin = engineLoadDFF("m4.dff", 356) 
    engineReplaceModel(skin, 356) 
end 
addEventHandler("onClientResourceStart", resourceRoot, applyMods) 

<meta> 
<script src="scriptname.lua" /> 
</meta> 

Sorry for bumping an old topic, but I guess the guy seemed desperate and needed help.

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