Jump to content

getPlayerMoney


Shady1

Recommended Posts

i want to get 1 dollar when i kill a zombie but it won't work out getPlayerMoney command,Shop token instead of getplayermoney
this is the old script, can you help me: 

addEventHandler( "onZombieGetsKilled", getRootElement(),
    function( killer )
        givePlayerMoney( killer, 1 );
    end
)

Link to comment

try change
givePlayerMoney( killer, 1 )  to setPlayerMoney(killer, getPlayerMoney(killer) + 1)



Edit:
Event "onZombieGetsKilled" doesn't exists! New event - onZombieWasted

addEventHandler( "onZombieWasted", getRootElement(),
    function( attacker, weapon, bodypart )
        givePlayerMoney( attacker, 1 );
    end
)
 

Edited by VortDyn
Link to comment

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