Jump to content

What is the error?


xRGamingx

Recommended Posts

Posted

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 )

J8qp3Hp.png?1

M2FJ7QQ.jpg?1

Posted (edited)
local weapon = getPedWeapon(localPlayer)
local weaponName = getWeaponNameFromID(weapon)

The weapon is required, not the player.

Edited by ÆBKV
  • Thanks 1
Posted
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

Posted
local weapon = getPedWeapon(localPlayer)
local weaponName = getWeaponNameFromID(weapon)
outputChatBox( "Weapon name: "..tostring(weaponName) )

 

  • Thanks 1
Posted
20 minutes ago, DNL291 said:

local weapon = getPedWeapon(localPlayer)
local weaponName = getWeaponNameFromID(weapon)
outputChatBox( "Weapon name: "..tostring(weaponName) )

 

Broth Thanks !! Good

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