[LUA Question] Money Printer To Exp :)

Hello guys , well i was thinking about creating a money printer that works with my level system and finally i got it :slight_smile: i create 2 skills 1: Printer Speed and the other Printer Amount , now i have a little question :frowning:

i was thinking about this function:

[lua]

function ENT:Use(activator)

if(activator:IsPlayer()) then
activator:AddMoney(self:GetNWInt(“PrintA”));
self:SetNWInt(“PrintA”,0)
end
end

[/lua]

There is a way that i can handle out this:

( when you receive 1 money , you get 0.1 experience ) so if you get 10 money you receive 1 experience … who can help me ?

Thanks Guys ! :slight_smile:

if it’s a collecting printer, do

[lua]function ENT:Use(activator)

if(activator:IsPlayer()) then
local expamt = PrintA/10
activator:AddMoney(self:GetNWInt(“PrintA”));
activator:SetExperience(experience + expamt) – if you have a function like AddExperience() or something, do activator:AddExperience(expamt), i don’t know how your code is set up
self:SetNWInt(“PrintA”,0)
end
end[/lua]

Thanks , already handle out the printer :smiley:
bye =D

Thanks To: LauScript & You :slight_smile:

Cool! your using my printers as a base! self happyness