Advertisement
Guest User

Untitled

a guest
Jul 29th, 2014
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function payCheck(job, pay, vol) -- String, Base Pay, Volatility (vol*eco_points)
  2.     local bonus = 1
  3.         if self:IsPremium() then
  4.                 bonus = 1.50
  5.         end
  6.     local pay = math.Round(( (pay * bonus) + math.Round(GetGlobalInt("Eco_points") * vol) ))
  7.     if pay >= 1)
  8.         self:AddMoney(BANK, pay)
  9.             self:Hint("You have received $"..pay.." for being "..job.. ". It has been sent to your bank account.")
  10.     end
  11.     -- failsafe in case any checks go below 0. dont want people losing money for working.
  12.     if pay <= 0
  13.             self:Hint("The economy is too low and cannot afford to pay your wages.")
  14. end
  15.  
  16. function PLAYER:PayWage()
  17.         if (not self:IsValid()) then return end
  18.         if (not self.Loaded) then return false end
  19.                         -- MAX hourly for growing w/ prem ~55,000
  20.         if self:Team() == CLASS_CITIZEN then
  21.                 payCheck("a Citizen", 60, 1)   -- MAX hourly w/ prem 5,600 REALISTIC 4,480        
  22.         elseif self:Team() == CLASS_POLICE then
  23.                 payCheck("a Policeman", 350, 7) -- MAX hourly w/ prem 35,000 REALISTIC 26,800          
  24.         elseif self:Team() == CLASS_MEDIC then
  25.                 payCheck("a Medic", 325, 7)  -- MAX hourly w/ prem 33,500 REALISTIC 26,800
  26.         elseif self:Team() == CLASS_FIREMAN then
  27.                 payCheck("a Firefighter", 325, 7)  -- MAX hourly w/ prem 33,500 REALISTIC 26,800
  28.         elseif self:Team() == CLASS_SWAT then
  29.                 payCheck("a member of the Swat Team", 350, 7)  -- MAX hourly w/ prem 35,000 REALISTIC 28,000
  30.         elseif self:Team() == CLASS_CHIEF then
  31.                 payCheck("the Police Chief", 400, 8)  -- MAX hourly w/ prem 40,000 REALISTIC 32,000      
  32.         elseif self:Team() == CLASS_MAYOR then
  33.                 payCheck("the Mayor of Evocity", 500, 9)  -- MAX hourly w/ prem 48,000 REALISTIC 38,000
  34.         end
  35. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement