Jump to content

some Help over here!


E-mail

Recommended Posts

Hi i have Made a Health Pickup

how to add if player take the pickup PlayerName... Have Take a Health!

my code

outputChatBox("Health_Pickup|By[xiGooglex]"),255,255,0 
function createDeathPickup ( totalammo, killer, killerweapon, bodypart ) 
   local  x, y, z = getElementPosition ( source ) 
   local  health = createPickup ( x, y, z, 0, 40) 
   addEventHandler("onPickupHit", health, givePlayerHealth) 
end 
addEventHandler ( "onPlayerWasted", getRootElement(), createDeathPickup ) 
  
function givePlayerHealth(thePlayer) 
     setElementHealth(thePlayer,tonumber(getElementHealth(thePlayer))+tonumber(getPickupAmount(source))) 
    destroyElement(source) 
end 

:|

Link to comment
outputChatBox("Health_Pickup|By[xiGooglex]",255,255,0) 
function createDeathPickup ( totalammo, killer, killerweapon, bodypart ) 
   local  x, y, z = getElementPosition ( source ) 
   local  health = createPickup ( x, y, z, 0, 40) 
   addEventHandler("onPickupHit", health, givePlayerHealth) 
end 
addEventHandler ( "onPlayerWasted", getRootElement(), createDeathPickup ) 
  
function givePlayerHealth(thePlayer) 
     outputChatBox(tostring(getPlayerName(thePlayer)) .." has picked up health.",getRootElement(),0,255,0) 
     setElementHealth(thePlayer,tonumber(getElementHealth(thePlayer))+tonumber(getPickupAmount(source))) 
    destroyElement(source) 
end 

Edited by Guest
Link to comment

you make the code ?

function createDeathPickup ( totalammo, killer, killerweapon, bodypart ) 
       local  x, y, z = getElementPosition ( source ) 
       local  health = createPickup ( x, y, z, 0, 40) 
       addEventHandler("onPickupHit", health, givePlayerHealth) 
    end 
    addEventHandler ( "onPlayerWasted", getRootElement(), createDeathPickup ) 
      
    function givePlayerHealth(thePlayer) 
         setElementHealth(thePlayer,tonumber(getElementHealth(thePlayer))+tonumber(getPickupAmount(source))) 
        destroyElement(source) 
    end 

i think you want to make like bssol and TAPL script :redhotevil:

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