[lua]self.Victim:ConCommand( "pp_mat_overlay my/overlay/here" )[/lua]
I have this line under a function, and when the function happens the script is called, and it applies my overlay. It does so by running a console command, question is, which console command removes/disables the overlay?:v:
Instead of applying the overlay on the client with a console command ( which can be aliased to prevent the overlay from showing up ), why not take a look at how the overlays Lua file displays them and use that ( drawing a texture across the screen )?
[QUOTE=Acecool;45917280]Instead of applying the overlay on the client with a console command ( which can be aliased to prevent the overlay from showing up ), why not take a look at how the overlays Lua file displays them and use that ( drawing a texture across the screen )?[/QUOTE]
Wow, thanks for the quick reply. I went to the Garry's Mod console and typed
[lua]pp_mat_overlay ""[/lua]
That removed the overlay, so I went to paste that bit into my timer.
[lua] timer.Create( "timer", 4, 0, function()
self.Victim:ConCommand( "pp_mat_overlay """ )--line 244
end)[/lua]
And I get this error.
[code]lua:244: ')' expected near '""'
[/code]
Now back to what you said, I tried that before this post, but I must have missed it, because when I went back, this is what I found.
[lua]pp_mat_overlay = {
on = overlay.Material,
off = ""
[/lua]
I am a right, this is pretty much another way to do what I'm doing. So recap, the console command
[lua]pp_mat_overlay ""[/lua]
Does the job, but when ran through lua I get the error. Advice anyone?:smile:
[editline]7th September 2014[/editline]
Woah, I had this idea, and it worked.
Sometimes for fun on my keyboard I will make an invisible character and send it to a friend.
[lua]self.Victim:ConCommand( "pp_mat_overlay •" )[/lua]
I just put the invisible character where I would put the path to the overlay and it worked...
Haha :dance:
Sorry, you need to Log In to post a reply to this thread.