28.02.2010, 17:25
Hi,
I got a command called /combine. In it player specifies 4 numbers, for example..
The problem is that those numbers can be arranged in any way..
Then i use "sscanf" to get the variables and store them into s1, s2, s3 and s4.
Is there some fast way to check if those variables are exactly what i need instead of making something like..
It is kinda hard to do it that way.
Thanks.
I got a command called /combine. In it player specifies 4 numbers, for example..
Код:
/combine 3 14 2 26
Код:
/combine 2 3 14 26 or /combine 2 14 26 3
Is there some fast way to check if those variables are exactly what i need instead of making something like..
pawn Код:
if((s1==2 && s2==3 && s3==14 && s4==26) || (s1==3 && s2==2 && s3==14 && s4==26) || (...) || (...))
Thanks.