xRGamingx Posted February 10, 2018 Posted February 10, 2018 I just created a HUD, and below I put a dx text to get the name of the weapon I'm using I need to know what I can use to call the names of the weapons I already use > local weapID = getWeaponIDFromName(localPlayer )
NeXuS™ Posted February 10, 2018 Posted February 10, 2018 You can use getPedWeapon and getWeaponNameFromID to get the weapon name. 1
ÆBKV Posted February 11, 2018 Posted February 11, 2018 (edited) local weapon = getPedWeapon(localPlayer) local weaponName = getWeaponNameFromID(weapon) The weapon is required, not the player. Edited February 11, 2018 by ÆBKV 1
xRGamingx Posted February 11, 2018 Author Posted February 11, 2018 11 minutes ago, NeXuS™ said: You can use getPedWeapon and getWeaponNameFromID to get the weapon name. Brother I was to use And I get the ID of the weapon local weaponType = getPedWeapon ( localPlayer )
DNL291 Posted February 11, 2018 Posted February 11, 2018 (edited) getPedWeapon returns the weapon ID and getWeaponNameFromID returns the weapon name. You should be using getPedWeapon instead of getWeaponNameFromID. Edited February 11, 2018 by DNL291
xRGamingx Posted February 11, 2018 Author Posted February 11, 2018 1 hour ago, DNL291 said: getPedWeapon returns the weapon ID and getWeaponNameFromID returns the weapon name. You should be using getPedWeapon instead of getWeaponNameFromID. If you look at the image, I'm using the local weaponType = getPedWeapon ( localPlayer ) And I get down on the hud id the gun The weapon that I am using is AK-47 -ID 30 instead of the id I want the name of the weapon to come out
DNL291 Posted February 11, 2018 Posted February 11, 2018 local weapon = getPedWeapon(localPlayer) local weaponName = getWeaponNameFromID(weapon) outputChatBox( "Weapon name: "..tostring(weaponName) ) 1
xRGamingx Posted February 11, 2018 Author Posted February 11, 2018 20 minutes ago, DNL291 said: local weapon = getPedWeapon(localPlayer) local weaponName = getWeaponNameFromID(weapon) outputChatBox( "Weapon name: "..tostring(weaponName) ) Broth Thanks !! Good
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now