[code]-- deathfee - the amount of money someone drops when dead.
GM.Config.deathfee = 30[/code]
How can drop all the money when someone die ?
Put it on ridiculously high number (1mil, or whatever), it will drop no more than player has, anyways.
Or use paid version of ARCBank, it has a feature where you can set the % of money player drops, and loses.
[QUOTE=RaKo;52616239]Put it on ridiculously high number (1mil, or whatever), it will drop no more than player has, anyways.
Or use paid version of ARCBank, it has a feature where you can set the % of money player drops, and loses.[/QUOTE]
not an efficient way to do it :P
Try this:
[code]
hook.Add('PlayerDeath', 'dropurMoneyBITCHBOI', function(pl) -- This hooks is called every time a player dies. The arguement "pl" is the player that died
if pl:getDarkRPVar 'money' > 0 then -- Check if they have money to drop
local money = pl:getDarkRPVar 'money' -- Store the amount of money they have in this variable
local pos = pl:GetPos() + Vector(0, 0, 50) -- Store the players position, and add Vector(0, 0, 50) to it to have the money spawn above the player
pl:addMoney(money * -1) -- Set the players money to 0 (take the money variable and multiply by negative one)
DarkRP.createMoneyBag(pos, money) -- Create the money bag with the premade darkrp function "DarkRP.createMoneyBag", first param being the pos, and second the amount to drop
end
end)
[/code]
untested but should work
[QUOTE=Tupac;52616473]not an efficient way to do it :P
Try this:
[code]
hook.Add('PlayerDeath', 'dropurMoneyBITCHBOI', function(pl) -- This hooks is called every time a player dies. The arguement "pl" is the player that died
if pl:getDarkRPVar 'money' > 0 then -- Check if they have money to drop
local money = pl:getDarkRPVar 'money' -- Store the amount of money they have in this variable
local pos = pl:GetPos() + Vector(0, 0, 50) -- Store the players position, and add Vector(0, 0, 50) to it to have the money spawn above the player
pl:addMoney(money * -1) -- Set the players money to 0 (take the money variable and multiply by negative one)
DarkRP.createMoneyBag(pos, money) -- Create the money bag with the premade darkrp function "DarkRP.createMoneyBag", first param being the pos, and second the amount to drop
end
end)
[/code]
untested but should work[/QUOTE]
Thanks, It works <3
Sorry, you need to Log In to post a reply to this thread.