Creating a colour changing money printer-Need help!
5 replies, posted
Using Koolaidmini's Custom Printers
cl_init.lua = [url]http://pastebin.com/r6DSGUrv[/url]
init.lua = [url]http://pastebin.com/7b59PQt1[/url]
shared.lua = [url]http://pastebin.com/VdTFXtGy[/url]
Code I am using for the colour is
ent.printerColor = Color(30,30,30,math.abs(math.sin(CurTime()*6)*255));
Could someone tell me what I am doing wrong?
You need to tell us what's actually wrong
I'm trying to make the printer change colour every few seconds but I can't get it to work.
You need self:SetColor(self.printerColor) in ENT:Draw() too
[QUOTE=Coffeee;50865972]You need self:SetColor(self.printerColor) in ENT:Draw() too[/QUOTE]
like this ?
function ENT:Draw()
self.Entity:DrawModel();
self:SetColor(self.printerColor);
[editline]11th August 2016[/editline]
ent.printerColor = Color(30,30,30,math.abs(math.sin(CurTime()*6)*255));
I don't understand what I am doing wrong :/
You should use self:DrawModel() - No need to reference the entity field.
Also, please print the error that Garry's mod provides you so we can help you.
Sorry, you need to Log In to post a reply to this thread.