Jump to content

[HELP] Money drops


Clydian

Recommended Posts

function deadDropsMoney ( totalammo, killer, killerweapon, bodypart ) 
    x, y, z = getElementPosition ( source ) 
    local moneyonhand=createPickup ( x, y, z, 3, 1212, 10000) 
    local deadmoney = getPlayerMoney(source) 
    setElementData(moneyonhand,"Amount",deadmoney) 
    takePlayerMoney(source,deadmoney) 
end 
addEventHandler ( "onPlayerWasted", getRootElement(), deadDropsMoney ) 

Something is not working. So when a player dies, he drops the pickup, bet when you walk on pickup (money's pickup) it dissapears, but money is not given to the pickup's collector. And the money keeps respawning, i donw want it to respawn.

Someone knows whats the problem?

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