Advertisement
Guest User

Untitled

a guest
Nov 5th, 2019
446
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.79 KB | None | 0 0
  1. local DROP = CarePackage:CreateDrop()
  2. DROP.InventoryEnabled = false
  3. DROP.EquipName = CarePackage:GetPhrase("Drops.Money.Take")
  4.  
  5. function DROP:CanLoot(ent, ply, type)
  6.     return true
  7. end
  8.  
  9. function DROP:Loot(ent, ply, type)
  10.     ply:addMoney(ent)
  11. end
  12.  
  13. function DROP:GetName(ent)
  14.     return DarkRP.formatMoney(ent)
  15. end
  16.  
  17. function DROP:GetModel(ent)
  18.     return GAMEMODE.Config.moneyModel
  19. end
  20.  
  21. function DROP:GetData(ent)
  22.     return {
  23.         camera = {
  24.             x = 40,
  25.             y = -20
  26.         }
  27.     }
  28. end
  29.  
  30. function DROP:GetColor(ent)
  31.     if (self.Options.Color) then return self.Options.Color end
  32.  
  33.     if (Inventory) then
  34.         local rarity = Inventory.Config.Rarities["spawned_money"] or 1
  35.        
  36.         return Inventory.Config.Categories[rarity].color
  37.     end
  38.  
  39.     return CarePackage.Config.DefaultItemColor
  40. end
  41.  
  42. DROP:Register("Money")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement