Jump to content

Money


Norhy

Recommended Posts

He is right, try this one

server.lua

    local killerMoney = 1000    --Amount of money when you kill somebody. 
    local deadPlayerMoney = 1000   --Amount of money you lose when you die. 
    local joinMoney = 1000   --Amount of money you earn when you join the server. 
function spawnOnJoin() 
    givePlayerMoney(source, joinMoney) 
end 
function spawnOnDead(ammo, killer, weapon, bodypart) 
    takePlayerMoney(source, deadPlayerMoney) 
    if (killer) and (killer ~= source) then 
        givePlayerMoney(killer, killerMoney) 
    end 
end 
  
addEventHandler("onPlayerJoin", getRootElement(), spawnOnJoin) 
addEventHandler("onPlayerWasted", getRootElement(), spawnOnDead) 

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