• Resetting players money after death.
    3 replies, posted
Any ideas how to do it? Hook is PlayerDeath, am I right? So it will be hook.Add("PlayerDeath", "ResetMoney", function() --what do I write here? xd end)
hook.Add("PlayerDeath", "ResetMoney", function(ply, inflictor, attacker) if not IsValid(ply) then return end ply:SetPData( "Money", 0 ) end)
hook.Add("PlayerDeath","ResetMoney",function(ply,weapon,killer) local target,amount=ply,GAMEMODE.Config.startingmoney DarkRP.storeMoney(target,amount) target:setDarkRPVar("money",amount) end)
Thanks to all who replied. Going to test it.
Sorry, you need to Log In to post a reply to this thread.