Jump to content

zombie kills score


Chaos

Recommended Posts

Posted
function getPlayersZombiekills  for index, player in ipairs (getElementsByType "player" ) do  setElementData ( player, "zombiekills", getPlayerzombiekills ( player ) ) table.sort End  end  

is that true?

Posted

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 
) 

My in-game name: Jaysds1

Retired CMG Scripter

World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode

Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/

 

sE5Qm.png

TiV3C.png

img.php?id=0&text=Lua%20Scripter

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