Jump to content

How to Mod weapon and Skins etc.. in Server?


Recommended Posts

Posted

hello mta.i am making a server on my own.i am working on it.i want to know how to add weapon mods,weapon sfx sounds,and skins.i have skins,weapons downloaded from various webs.it could be helpful if anybody could tell me how to mod them.thank you.

  • Moderators
Posted

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

  • Moderators
Posted

Well then you have to create it manually.

engineImportTXD (engineLoadTXD ( "file" ), ID ) 
engineReplaceModel ( engineLoadDFF ( "file", ID ), ID ) 

Weapon ID's

https://wiki.multitheftauto.com/wiki/Weapon

Replace sounds isn't possible. (you have to play them with playSound or playSound3D)

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

Posted

try this my script weapon sound 3D :D

function weaponfired(weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement) 
    local soundfile = "" 
  
    if weapon == 24 then 
        soundfile = "deagle.wav" 
    elseif weapon == 23 then 
        soundfile2 = "silenced.wav" 
    elseif weapon == 22 then 
        soundfile = "colt.wav" 
    elseif weapon == 29 then 
        soundfile = "mp5.wav" 
    elseif weapon == 25 or weapon == 26 then 
        soundfile = "shotgun.wav" 
    elseif weapon == 27 then 
        soundfile = "combat.wav" 
    elseif weapon == 28 then 
        soundfile = "uzi.wav" 
    elseif weapon == 34 or weapon == 33 then 
        soundfile = "sniper.wav" 
    elseif weapon == 31 then 
        soundfile = "m4.wav" 
    elseif weapon == 30 then 
        soundfile = "ak_47.wav" 
    elseif weapon == 35 or weapon == 36 then 
        soundfile = "rpg.wav" 
    end 
     
    local x, y, z = getElementPosition(source) 
    local sound = playSound3D(soundfile, x, y, z, false) 
    setSoundVolume(sound,0.9) 
    setSoundMaxDistance(sound, 40) 
end 
addEventHandler("onClientPlayerWeaponFire", root, weaponfired) 

  • Like 1

Omerta Roleplay

Posted
i created a resource called mp5 and pasted txd and dff files and created lua file.no meta file needed?

Of course with out the "META" File the resource won't loaded.

  

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