[SOLVED] Checking multiple variables for their values
#1

Hi,

I got a command called /combine. In it player specifies 4 numbers, for example..
Код:
/combine 3 14 2 26
The problem is that those numbers can be arranged in any way..
Код:
/combine 2 3 14 26
or
/combine 2 14 26 3
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..
pawn Код:
if((s1==2 && s2==3 && s3==14 && s4==26) || (s1==3 && s2==2 && s3==14 && s4==26) || (...) || (...))
It is kinda hard to do it that way.

Thanks.
Reply


Messages In This Thread
[SOLVED] Checking multiple variables for their values - by CaHbKo - 28.02.2010, 17:25
Re: [HELP] Checking multiple variables for their values - by smeti - 28.02.2010, 17:36
Re: [HELP] Checking multiple variables for their values - by [HiC]TheKiller - 28.02.2010, 17:37
Re: [HELP] Checking multiple variables for their values - by CaHbKo - 28.02.2010, 17:45
Re: [HELP] Checking multiple variables for their values - by smeti - 28.02.2010, 18:11
Re: [HELP] Checking multiple variables for their values - by CaHbKo - 01.03.2010, 12:04

Forum Jump:


Users browsing this thread: 2 Guest(s)