Jump to content

Help with weapons


manve1

Recommended Posts

I never used them, i had 7 or 8 tries to make it work, but i failed, here is the script:

weap = guiCreateLabel( 0.2, 0.2, 0.1, 0.1, 'Weapon: ', true ) 
  
function weapname ( ) 
setTimer( function() 
local weaponType = getPedWeapon ( localPlayer ) 
if ( weaponType ) then 
    guiSetText( weap, 'Weapon: '.. getWeaponNameFromID ( weaponType ) ) 
end 
end, 50, 0 
) 
end 

Link to comment
weap = guiCreateLabel( 0.2, 0.2, 0.1, 0.1, 'Weapon: ', true ) 
  
setTimer ( 
    function ( ) 
        local weaponType = getPedWeapon ( localPlayer ) 
        if ( weaponType ) then 
            guiSetText ( weap, 'Weapon: '.. getWeaponNameFromID ( weaponType ) ) 
        end 
    end 
    ,50, 0 
) 

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