Jump to content

[HELP] Remove current weapon (now when holding it)


28WL

Recommended Posts

Hi guys. Can someone tell me how I could make the current weapon disappear from hands right now if the clip is bigger than rockets for example in the inventory? I use client side. Can someone share the script?

function checkWeaponAmmo() 
    a = getPedWeapon( getLocalPlayer() ) 
    c = getPedAmmoInClip ( getLocalPlayer() ) 
    if ( a==35 ) then 
        if c > getElementData(getLocalPlayer(),"rocket1") then 
            setWeaponAmmo ( getLocalPlayer(), 35, 0, 0) -- Here is the problem. How I can resolve it? 
        end 
    end 
    if ( a==36 ) then 
        if c > getElementData(getLocalPlayer(),"rocket2") then 
            setWeaponAmmo ( getLocalPlayer(), 36, 0, 0 ) -- Here is the problem. How I can resolve it? 
        end 
    end 
end 
setTimer(checkWeaponAmmo, 100, 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...