How would I do this...
#5

Quote:
Originally Posted by Wesley221
Посмотреть сообщение
pawn Код:
if(var > 0 && var < 10 )
{

}
else ic(var > 10 && var < 20)
{

}
like that you can check multiple things
^, not sure if you care about how you do it or not, but I might as well just put it out there. It's faster and a lot cleaner then a ton of if / else if 's.

You could also do

pawn Код:
switch(Player[playerid][Somevarable])
{
    case 1..9:
    {
        //message if the var is inbetween 1 and 9.
    }
    case 10:
    {
        //message if the var = 10
    }
    case 11..19:
    {
        //message if the var is inbetween 11 and 19
    }
}
Reply


Messages In This Thread
How would I do this... - by Lynn - 02.02.2012, 01:56
Re: How would I do this... - by Rokzlive - 02.02.2012, 02:00
Re: How would I do this... - by Lynn - 02.02.2012, 02:21
Re: How would I do this... - by Wesley221 - 02.02.2012, 05:47
Re: How would I do this... - by Haydz - 02.02.2012, 06:48
Re: How would I do this... - by Wesley221 - 02.02.2012, 06:57

Forum Jump:


Users browsing this thread: 1 Guest(s)