Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2014
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. function meta:addMoney(amount)
  2. if not amount then return false end
  3. local newmoney = self.DarkRPVars.money + math.floor(amount)
  4. if newmoney > 25000 then
  5. newmoney = 25000
  6. end
  7. DB.StoreMoney(self, newmoney)
  8. local total = self:getDarkRPVar("money") + math.floor(amount)
  9. total = hook.Call("playerWalletChanged", GAMEMODE, self, amount, self:getDarkRPVar("money")) or total
  10.  
  11. self:setDarkRPVar("money", total)
  12.  
  13. if self.DarkRPUnInitialized then return end
  14. DarkRP.storeMoney(self, total)
  15. end
  16.  
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement