how to check for number
#1

how to check for numbers
need some help here is the command

Код:
//in some command
new id,input[128],choice[128];
if(sscanf(params,"ss",input,choice)
{
    return SendClientMessge(playerid, RED, "SYNTAX /setplayerlabelstate [playerid/all] [yes/no]");
}
if(strcmp(input,"all",true,64)==0)
{
	
}
else
{
    id = strval(input);
}
now I would like it so the player can enter id 0 but I would also like it to return if player enter anything besides 'all' but I don't want it to run the rest of the code as id 0 when it does not find anything

how do I do this ?
Reply


Messages In This Thread
how to check for number - by horsemeat - 27.03.2013, 01:47
Re: how to check for number - by Gamer_007 - 27.03.2013, 01:57
Re: how to check for number - by horsemeat - 27.03.2013, 02:09
Re: how to check for number - by Gamer_007 - 27.03.2013, 02:12
Re: how to check for number - by horsemeat - 27.03.2013, 02:17

Forum Jump:


Users browsing this thread: 1 Guest(s)