How can i do this?
#2

pawn Код:
tmpstr[16];
sscanf(params, "s ", tmpstr);
if(!strcmp(tmpstr, "test", true))
{
  new value;
  if(sscanf(params[strlen(tmpstr)], "d", value)) return SendClientMessage(playerid, COLOR_RED, "Usage: /cmd test [seconds]");
  ...
}
else if(!strcmp(tmpstr, "test2", true) || !strcmp(tmpstr, "t2", true))
{
  new value;
  if(sscanf(params[strlen(tmpstr)], "d", value)) return SendClientMessage(playerid, COLOR_RED, "Usage: /cmd test2 [seconds]");
  ...
}
else return SendClientMessage(playerid, COLOR_RED, "Usage: /cmd [test/test2]");
It works with the non-plugin version of sscanf.. I dont know if it works with the plugin version.
Reply


Messages In This Thread
How can i do this? - by Torran - 01.05.2010, 14:32
Re: How can i do this? - by M4S7ERMIND - 01.05.2010, 14:45
Re: How can i do this? - by Torran - 01.05.2010, 14:48
Re: How can i do this? - by M4S7ERMIND - 01.05.2010, 15:24

Forum Jump:


Users browsing this thread: 2 Guest(s)