Jump to content

money drop


Recommended Posts

in playerJustGotDied check if theres "attacker" variable set to element.. if theres no attacker = suicide..

I think it works what i did but i dint tested with another player, here is the code

code removed

Edited by Guest
Link to comment
function playerJustGotDied(ammo, attacker, weapon, bodypart)
if (attacker ~= source) and (attacker ~= nil) then
cancelEvent()
else
createMoney(source);
end
end

Duude!! cancelEvent ??!!

You want to cancel death?

function playerJustGotDied(ammo, attacker, weapon, bodypart)
if (isElement(attacker)) then
   createMoney(source)
end
-- no need for else.. we just do nothing

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