• Rest money script
    5 replies, posted
Im VERY new to lua. I was wondering if anyone could help me create a script, where when a player dies, their money gets reset to a certain amount of money? EXAMPLE - I have $55,000 in DarkRP. And if i would die, my money would reset back to the default starting money, $1,000.
[url]http://wiki.garrysmod.com/page/hook/Add[/url] [url]http://wiki.garrysmod.com/page/GM/PlayerDeath[/url] And whatever DarkRP uses to set money.
give me your server IP so I can rdm on it
[QUOTE=john552;45307347]give me your server IP so I can rdm on it[/QUOTE] 127.0.0.1
[QUOTE='[AG] Apple;45307247']Im VERY new to lua. I was wondering if anyone could help me create a script, where when a player dies, their money gets reset to a certain amount of money? EXAMPLE - I have $55,000 in DarkRP. And if i would die, my money would reset back to the default starting money, $1,000.[/QUOTE] [lua]hook.Add( "PlayerDeath", "SetMoneyOnDeath", function( ply ) ply:setDarkRPVar( "money", 1000 ) end )[/lua]
[code]hook.Add( "PlayerDeath", "itsThatSimple", function( victim, weapon, killer ) victim:SetNWString("Money", 1000) end)[/code] You owe me 1$
Sorry, you need to Log In to post a reply to this thread.