Jump to content

Weapon sound by the name


Actimel

Recommended Posts

Just now, Killer Project said:

did you want to get the weapon from name ?

yes because i want put sound for example AK 47 has ID 30 and other weapon like aku has also id 30 and when i put sounds on id it plays on these 2 weapons because they have same id

Link to comment
9 hours ago, Actimel said:

yes because i want put sound for example AK 47 has ID 30 and other weapon like aku has also id 30 and when i put sounds on id it plays on these 2 weapons because they have same id

the weapon has one ID !!
https://wiki.multitheftauto.com/wiki/Weapons


but if you want to get the weapon from name u can use
 

getWeaponNameFromID

-- ex

if getWeaponNameFromID ( 30 ) == "ak-47" then
playSound ( ... ) -- or playSound3D
elseif getWeaponNameFromID ( 31 ) == "m4" then
playSound ( ... ) -- or playSound3D
end

 

Edited by Killer Project
edit weapon name
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...