Jump to content

[HELP] Money drops


Clydian

Recommended Posts

Posted
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?

STEAM: Clydian

Posted

Still dont know why not money when picking it up, but in respawn time i putted -1 now they dont respawn.. but whats the money not collectiong problem?

STEAM: Clydian

  • Moderators
Posted

There is no pick-up that gives money, you have to script that.

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

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