Two things about DCMD
#6

Код:
dcmd_test(playerid, cmdtext[])
{
  new option[256], index;

  option = strtok(cmdtext, index);

  if (!strcmp(option, "one", true))
  { 
    SendClientMessage(playerid, COLOR, "You typed one!");
  }

 else if (!strcmp(option, "two", true))
 {
   SendClientMessage(playerid, COLOR, "You typed two!");
 }

 return 1;
}
Something like this would work, you'd then just have to use strtok again to get the next peice (id)
Reply


Messages In This Thread
Two things about DCMD - by Sergei - 07.08.2009, 22:55
Re: Two things about DCMD - by MadeMan - 07.08.2009, 23:11
Re: Two things about DCMD - by Sergei - 07.08.2009, 23:24
Re: Two things about DCMD - by MadeMan - 07.08.2009, 23:28
Re: Two things about DCMD - by Sergei - 07.08.2009, 23:31
Re: Two things about DCMD - by Ez - 08.08.2009, 01:06
Re: Two things about DCMD - by ruarai - 08.08.2009, 01:48
Re: Two things about DCMD - by Sergei - 08.08.2009, 06:34

Forum Jump:


Users browsing this thread: 1 Guest(s)