command ?
#4

Use this:

Код:
    if(strcmp(cmd, "/cmd", true) == 0)
	{
			new tmp[256];
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid,COLOR_WHITE,"USAGE: /cmd [1/0]");
				return 1;
			}
			if(strcmp(tmp,"0",true) == 0)
			{
                  print("zero");
				return 1;
			}
			else if(strcmp(tmp,"1",true) == 0)
			{
				print("one");
				return 1;
			}
			else // Other = Error message
			{
			   SendClientMessage(playerid, COLOR_WHITE, "ERROR: /cmd [1/0]");
			   return 1;
			}
	}
Reply


Messages In This Thread
command ? - by luxeon - 17.02.2009, 16:08
Re: command ? - by luxeon - 17.02.2009, 19:00
Re: command ? - by luxeon - 18.02.2009, 13:19
Re: command ? - by DaRkDeViiL - 19.02.2009, 02:02

Forum Jump:


Users browsing this thread: 3 Guest(s)