Chaos Posted May 24, 2013 Posted May 24, 2013 Hi, is there a way to make best player zombie kills score with dxdrawtext?
iPrestege Posted May 26, 2013 Posted May 26, 2013 table.sort https://wiki.multitheftauto.com/wiki/Slothman/Zombies#onZombieWasted
Chaos Posted May 26, 2013 Author Posted May 26, 2013 function getPlayersZombiekills for index, player in ipairs (getElementsByType "player" ) do setElementData ( player, "zombiekills", getPlayerzombiekills ( player ) ) table.sort End end is that true?
Jaysds1 Posted May 26, 2013 Posted May 26, 2013 Please note that LUA is very Case-Sensitve. Also,that would not work.
Jaysds1 Posted May 27, 2013 Posted May 27, 2013 Try this, and please read the comments in it: addEventHandler("onZombieWasted",root, --Wait for a zombie to die function(att) --when a zombie dies, get the attacker/killer local kills = getElementData(att,"zombieKills") or 0 --get how much zombies they killed and if they have not killed any, then give them 0 setElementData(att,"zombieKills",kills) --set how much zombies they killed end )
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