14.02.2010, 07:04
Quote:
Originally Posted by sebacol
TNX but how can I now if someone type this: /command 1 blah blah blah blah blah
how to get this num and all that text? |
then OnPlayerCommandText(..), add:
Код:
dcmd(command,8,cmdtext);
dcmd_command(playerid,params[])
{
new i, tmp[20];
if(sscanf(params,"is",i,tmp))return SendClientMessage(playerid,0xFFFFFFFF," USAGE: /command integer text");
new string[25]; format(string,sizeof(string)," Pawno gets: integer: %d, and string: %s.",i,tmp);
return SendClientMessage(playerid,0xFFFFFFFF,string);
}
Now:
i - integer (number)
s - string (text)
So you should use this command: /command 1 blahblahblah