• surface.DrawPoly only working for one entity at a time?
    3 replies, posted
I have a bit of a weird problem. I made a script which allows people to capture flags, and I'm using surface.DrawPoly to draw the progress bar of the capture. The problem that happens is that this only works for one entity at a time. This is all within the entity table/code. This is what I'm using to draw the circle: https://pastebin.com/ubGu4tRd This is my client side entity code (the flag) (not all of my code, just what's relevant): https://pastebin.com/MLkdh94K The circle is drawn when people are within the cap zone (lines 67-96). I did a print check, and the surface.DrawPoly function is getting called and the arc argument passed to it is good, but it's not drawing it for some reason. I'm only in the cap zone of one entity at a time. This is what it looks like: Screen capture Has anyone ever had this problem before?
Update* It seems that if I removed the first spawn flag, the next spawned flag will show the progress bar.
Another interesting thing. The surface.DrawPoly is getting called. I even saved one of the matrixs that was passed to the DrawPoly when it actually draws, and I made that a static input so that it draws the same matrix for every single flag. It still only draws for one flag though.
Nvm, fixed it. Also, yea, just putting fixed it because there were a bunch of people who just said "I would help you, but I don't wanna". So now, no one gets to know how I did it >:D
Sorry, you need to Log In to post a reply to this thread.