I know there is like alot of csgo spinners in gmod. BUT, I want to code mine from scratch without reading other theirs. With some help ofcourse.
No you’r probably expecting code, but my question is: how would you make the DermaPanel’s move and dissapear and come back like csgo case opening, and how would you make the little bar that decides what you get when it hits it?
If you can help me out here, thanks.
PS, I have a good knowledge of how to use Derma and draw functions. (HUD) *
You should proofread what you type. Kinda hard to understand you.
You don’t have good knowledge of Lua I assume so you might want to start there.
Now for your questions. To make the images spin you will have to make a random table with each value being a table with value of the image file path, the ent (or prize), color of how rare it is, etc.
The prize will be pre-defined. You will have it choosen as soon as the user hits “Spin”. You can then create a loop with a timer that just checks which table key is currently active and make it stop spinning (after a certain amount of time defined by the timer) when it hits the key of the prize that the guy won.
Animation and vgui is up to you.
This doesn’t work solely off of vgui. All the thinking is done with Lua fundamentals.