Chaos Posted May 24, 2013 Share Posted May 24, 2013 Hi, is there a way to make best player zombie kills score with dxdrawtext? Link to comment
xXMADEXx Posted May 25, 2013 Share Posted May 25, 2013 There are many ways to do this... Link to comment
Chaos Posted May 25, 2013 Author Share Posted May 25, 2013 Can u plz give me simple example cuz im newbie Link to comment
Quited Posted May 26, 2013 Share Posted May 26, 2013 download in description in video enjoy ^ Link to comment
iPrestege Posted May 26, 2013 Share Posted May 26, 2013 table.sort https://wiki.multitheftauto.com/wiki/Slothman/Zombies#onZombieWasted Link to comment
Chaos Posted May 26, 2013 Author Share 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? Link to comment
Jaysds1 Posted May 26, 2013 Share Posted May 26, 2013 Please note that LUA is very Case-Sensitve. Also,that would not work. Link to comment
Jaysds1 Posted May 27, 2013 Share 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 ) 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