• [LUA Question] Money Printer To Exp :)
    3 replies, posted
Hello guys , well i was thinking about creating a money printer that works with my level system and finally i got it :) i create 2 skills 1: Printer Speed and the other Printer Amount , now i have a little question :( 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 ! :)
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 :D bye =D Thanks To: LauScript & You :)
Cool! your using my printers as a base! *self happyness*
Sorry, you need to Log In to post a reply to this thread.