Jump to content

when zombie dies it doesnt give the player who killed it xp and money


dasdasf

Recommended Posts

i made a skript thats suppose to make it so when a zombie dies it gives the player who killed it xp and money and it doesnt work, how do i fix it?

the skript:

on death of zombie:
    clear the drops
    remove 1 from {zombiecount}
    broadcast "%{zombiecount}%"
    add 2 to {%killer%.money}
    add 1 to {%killer%.xp}

Link to comment
Share on other sites

on death:
    victim is zombie
    attacker is player
    clear drops
    remove 1 from {zombiecount}
    broadcast "%{zombiecount}%"
    add 2 to {money::%attacker%}
    add 1 to {xp::%attacker%}

You'd have to clarify the money and xp variables as {money::%player%} and {xp::%player%}

btw instead of using clear drops you can disable drops with /gamerule doTileDrops false

Edited by conneramd
Link to comment
Share on other sites

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
×
×
  • Create New...