I'm currently struggling with trying to figure out how to use the lines and quads to my advantage. I'm a new guy to GLua, but I'm very stuck at the vector part of this code. Could anyone elaborate on how to use it?
I'm trying to make a sort of control point thingy so people can capture if they stand inside the box.
Here is the code:
[CODE]function ENT:Draw()
self:DrawModel()
render.SetColorMaterial()
render.DrawQuad( Vector 1,1,1) Vector 1,1,1) Vector 5,5,5) Vector 6,6,6) table color=Color( 255, 255, 255 ) )
end[/CODE]
The wiki does confuse you at first, I guess. It should actually look something like:
[CODE]
render.DrawQuad( Vector( 1, 1, 1 ), Vector( 1, 1, 1 ), Vector( 5, 5, 5 ), Vector( 6, 6, 6 ), Color( 255, 255, 255 ) )
[/CODE]
You don't need all those spaces but it looks nicer that way to me
You should probably try looking around the wiki for a while (especially at the example code) so you get an understanding of how stuff should look
It has to be drawn within 3D rendering, [url]https://wiki.garrysmod.com/page/cam/Start3D2D[/url]
You're calling Vector incorrectly, Vector(1, 1, 1) not Vector 1, 1, 1) use parentheses to surround your arguments when calling functions
Last argument should only be Color(255, 255, 255)
[QUOTE=Sudoxe;51978300]It has to be drawn within 3D rendering, [url]https://wiki.garrysmod.com/page/cam/Start3D2D[/url]
[/QUOTE]
[img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/ENTITY/Draw]ENT:Draw[/url] is already in a 3D context
Thank you, I was using the wiki, but it didn't have an example.
Sorry, you need to Log In to post a reply to this thread.