^Dev-PoinT^ Posted November 8, 2011 Share Posted November 8, 2011 Hi all i need if Player Take The Health PickUp outputChatBox Msg To Him is it right? 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 if getPickupType ( source ) == 0 then amount = getPickupAmount ( source ) outputChatBox ( "You picked up " .. amount .. " health", thePlayer) Link to comment
myonlake Posted November 8, 2011 Share Posted November 8, 2011 function createDeathPickup(totalammo, killer, killerweapon, bodypart) local x, y, z = getElementPosition(source) health = createPickup(x, y, z, 0, 40) end addEventHandler("onPlayerWasted", getRootElement(), createDeathPickup) function givePlayerHealth(player) if getPickupType(source) == 0 then local amount = getPickupAmount(source) setElementHealth(player, tonumber(getElementHealth(player)) + tonumber(getPickupAmount(source))) destroyElement(source) outputChatBox("You picked up " .. amount .. " health", player) end end addEventHandler("onPickupHit", health, givePlayerHealth) Link to comment
Aibo Posted November 8, 2011 Share Posted November 8, 2011 stop fixing scripts for someone who doesnt want to learn. he just dump the random shit on you and you people fix it for him. this guy will never learn anything. Link to comment
MetaGamer Posted November 8, 2011 Share Posted November 8, 2011 stop fixing scripts for someone who doesnt want to learn.he just dump the random :~ on you and you people fix it for him. this guy will never learn anything. He is right. You should not fix his script but help him how to fix his script. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now