[SOLVED] Checking multiple variables for their values
#5

Quote:
Originally Posted by CaHbKo
pawn Код:
*a player enters /combine 2 5 6 1*
if(!sscanf(params, "iiii", s1, s2, s3, s4))
{
 if(All of the numbers contain 6 5 2 1)
 {
 ...
 }
}
pawn Код:
dcmd_combine(playerid,params[])
{
    new
        s1,
        s2,
        s3,
        s4,
        bool:Correct = false;
    if(sscanf(params, "dddd", s1, s2, s3, s4)) { return SendClientMessage(playerid, red, "Usage: /combine 4 number"); }
    else
    {
        if(s1 == 2) { if(s2 == 5) { if(s3 == 6) { if(s4 == 1) {
            Correct = true;
        }}}}
    }
    if(Correct == true)
    {
        SendClientMessage(playerid, red, "Correct");
    } else {
        SendClientMessage(playerid, yellow, "Not agreement.");
    }
    return 1;
}
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)