SA-MP Forums Archive
Bigger than 16, smaller than 99? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Bigger than 16, smaller than 99? (/showthread.php?tid=214491)



Bigger than 16, smaller than 99? - Spiral - 21.01.2011

Hey so I got this dialog, and I'd like to get a code:

pawn Код:
if(... this is the thing I need. );
{
    //my stuff
}
else
{
   SendClientMessage(... );
}
Any help?


Re: Bigger than 16, smaller than 99? - ExeC - 21.01.2011

If it's a list:

pawn Код:
if(dialogid == dialogid)
{
    if(response)
    {
        if(listitem == 0)
        {
            //your stuff
        }
        if(listitem == 1)
        {
           //Your stuff
        }
        return 1;
    }
}



Re: Bigger than 16, smaller than 99? - Mikkel_Pedersen - 21.01.2011

Of what I can understand you need to check if the value is bigger than 16 & smaller than 99.
pawn Код:
if(bla > 16 && bla < 99)
You can replace "bla" with whatever it is you are trying to check.


Re: Bigger than 16, smaller than 99? - Spiral - 21.01.2011

Mikkel answered it, thanks!


Re: Bigger than 16, smaller than 99? - CoaPsyFactor - 21.01.2011

you can do this too:

pawn Код:
(bla > 16 && bla < 99) ? return true : return false;



Re: Bigger than 16, smaller than 99? - viKKmaN - 21.01.2011

******, you need to become an online mathematics teacher