How to detect a string/text in a command?
#3

pawn Код:
COMMAND:engine(playerid,params[])
{
  if(isnull(params)) //usage
  else if(!strcmp(params,"on",true,2)) //on
  else if(!strcmp(params,"off",true,3)) //off
  else if(!strcmp(params,"hotwire",true,7)) //on
  else //invalid option
  return 1;
}
Reply


Messages In This Thread
How to detect a string/text in a command? - by DX7 - 28.05.2010, 15:14
Re: How to detect a string/text in a command? - by Jeffry - 28.05.2010, 15:16
Re: How to detect a string/text in a command? - by Sergei - 28.05.2010, 15:24

Forum Jump:


Users browsing this thread: 1 Guest(s)