View difference between Paste ID: PG6mfGRc and c9iWu79u
SHOW: | | - or go back to the newest paste.
1
function payCheck(job, pay, vol) -- String, Base Pay, Volatility (vol*eco_points)
2
	local bonus = 1
3
        if self:IsPremium() then
4-
        local bonus = 1
4+
5-
	local ecoCut = 1.5
5+
6-
	local citizen = 60
6+
	local pay = math.Round(( (pay * bonus) + math.Round(GetGlobalInt("Eco_points") * vol) ))
7-
	local medic = 175
7+
	if pay >= 1)
8-
	local fireman = 175
8+
		self:AddMoney(BANK, pay)
9-
	local police = 210
9+
        	self:Hint("You have received $"..pay.." for being "..job.. ". It has been sent to your bank account.")
10-
	local swat = 225
10+
	end 
11-
	local chief = 250
11+
	-- failsafe in case any checks go below 0. dont want people losing money for working.
12-
	local mayor = 300
12+
	if pay <= 0
13
        	self:Hint("The economy is too low and cannot afford to pay your wages.")
14
end
15
16-
       
16+
17
        if (not self:IsValid()) then return end
18-
                self:AddMoney(BANK,math.Round(( (citizen * bonus) + math.Round(GetGlobalInt("Eco_points") / ecoCut) )))
18+
19-
                self:Hint("You have received $"..math.Round(( (citizen * bonus) + math.Round(GetGlobalInt("Eco_points") / ecoCut) )).." for being a Citizen. It has been sent to your bank account.")               
19+
						-- MAX hourly for growing w/ prem ~55,000
20
        if self:Team() == CLASS_CITIZEN then
21-
                self:AddMoney(BANK, math.Round(( (police * bonus) + math.Round(GetGlobalInt("Eco_points") * ecoCut) )) )
21+
                payCheck("a Citizen", 60, 1)   -- MAX hourly w/ prem 5,600 REALISTIC 4,480         
22-
                self:Hint("You have received $"..math.Round(( (police * bonus) + math.Round(GetGlobalInt("Eco_points") * ecoCut) )).." for being a Police officer. It has been sent to your bank account.")               
22+
23
                payCheck("a Policeman", 350, 7) -- MAX hourly w/ prem 35,000 REALISTIC 26,800           
24-
                self:AddMoney(BANK, math.Round(( (medic * bonus) + math.Round(GetGlobalInt("Eco_points") * ecoCut) )) )
24+
25-
                self:Hint("You have received $"..math.Round(( (medic * bonus) + math.Round(GetGlobalInt("Eco_points") * ecoCut) )).." for being a Paramedic. It has been sent to your bank account.")
25+
                payCheck("a Medic", 325, 7)  -- MAX hourly w/ prem 33,500 REALISTIC 26,800
26
        elseif self:Team() == CLASS_FIREMAN then
27-
                self:AddMoney(BANK, math.Round(( (fireman * bonus) + math.Round(GetGlobalInt("Eco_points") * ecoCut) )) )
27+
                payCheck("a Firefighter", 325, 7)  -- MAX hourly w/ prem 33,500 REALISTIC 26,800
28-
                self:Hint("You have received $"..math.Round(( (fireman * bonus) + math.Round(GetGlobalInt("Eco_points") * ecoCut) )).." for being a Fire Fighter. It has been sent to your bank account.")
28+
29
                payCheck("a member of the Swat Team", 350, 7)  -- MAX hourly w/ prem 35,000 REALISTIC 28,000
30-
                self:AddMoney(BANK, math.Round(( (swat * bonus) + math.Round(GetGlobalInt("Eco_points") * ecoCut) )) )
30+
31-
                self:Hint("You have received $"..math.Round(( (swat * bonus) + math.Round(GetGlobalInt("Eco_points") * ecoCut) )).." for being part of the SWAT team. It has been sent to your bank account.")  
31+
                payCheck("the Police Chief", 400, 8)  -- MAX hourly w/ prem 40,000 REALISTIC 32,000       
32
        elseif self:Team() == CLASS_MAYOR then
33-
                self:AddMoney(BANK, math.Round(( (chief * bonus) + math.Round(GetGlobalInt("Eco_points") * ecoCut) )) )
33+
                payCheck("the Mayor of Evocity", 500, 9)  -- MAX hourly w/ prem 48,000 REALISTIC 38,000
34-
                self:Hint("You have received $"..math.Round(( (chief * bonus) +math.Round(GetGlobalInt("Eco_points") * ecoCut) )).." for being the police chief. It has been sent to your bank account.")         
34+
35
end