Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function MoneyLogTimerInit()
- timer.Create( "UniqueName", 3600, 0, LogMoney)
- end
- function LogMoney()
- local Timestamp = os.time()
- local TimeStr = os.date( "%X - %d/%m/%Y" , Timestamp )
- local Filename = Timestamp + TimeStr + ".log"
- local Result = ""
- for k, v in pairs(player.GetAll()) do
- local Money = v.DarkRPVars.money
- local Name = v:nick()
- Result = Result .. Name .. " $" .. Money .. "\n"
- end
- file.Write( "MoneyLogs/" .. Filename, Result )
- end
- hook.Add( "Initialize", "MoneyLog", MoneyLogTimerInit )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement