Castillo Posted May 3, 2010 Share Posted May 3, 2010 (edited) hey, i have a money drop script, but i wont when the player suicides lose his money, someone know how to do when he suicide dont lose it? here is my code code removed Edited May 3, 2010 by Guest Link to comment
dzek (varez) Posted May 3, 2010 Share Posted May 3, 2010 in playerJustGotDied check if theres "attacker" variable set to element.. if theres no attacker = suicide.. Link to comment
Castillo Posted May 3, 2010 Author Share Posted May 3, 2010 (edited) 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 May 3, 2010 by Guest Link to comment
dzek (varez) Posted May 3, 2010 Share Posted May 3, 2010 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
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