Jump to content

Pickup disappears whenever someone enters it


Cassandra

Recommended Posts

  • Moderators

I reply this because of andrel his reply. Maybe you want this.

addEventHandler("onPickupHit",root,function(player) 
    local theType = getPickupType ( source ) 
    if theType == 2 then 
        giveWeapon ( player, getPickupWeapon ( source ), getPickupAmmo ( source ), false ) 
    elseif theType == 1 then 
        setPedArmor ( player, getPedArmor ( player ) + getPickupAmount ( source )) 
    elseif theType == 0 then 
        setElementHealth ( player,getElementHealth ( player) + getPickupAmount ( source )) 
    end 
    cancelEvent() 
end) 
  
-- the maximum health is 200 and only able to reach that with full skill level. It will probably set to the highest possible health(depends on the skill level). (armor is 100) 
  

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