Quote Originally Posted by Ni3ls View Post
Hi all.

Im working on killstreak. You can pick 3 from a list. killstreak1 =1/0, killstreak2 = 1/0 etc. Now I made a small menu with 3 boxes and I want to show the image of the killstreak in each box. I can do this with endless "if statements" but i was wondering if there is a much faster way that it will check the values, assign them to the box and remove them from a list and check the next one. I have no idea how to do this and have no clue if this is even possible. Who can help me
There is probably a thousand different ways you could do it, but they all involve setting a cvar on the client in order to show the right killstreak in the right box. So, as such, there is no "automatic" way to do it - you have to write code which makes a different case for each killstreak.

In order to eliminate lots of "if .. else" statements, use the switch function, with the case being the right amount for each killstreak. If you post the code you already have, I can convert it to a switch function for you.