23.03.2011, 05:12
I'm just playing with random functions when I decided to use strlen to see how it works, I have come up with a test CMD that returns the amount of characters in what I type:
for example, if I type "/test hello" it will return "There are 5 characters in this string", the problem being if I go over 19 characters it still returns that there is only 19 characters in it.
pawn Код:
if(strcmp(cmd,"/test", true) == 0)
{
new str[128];
new tmp[256];
tmp = strtok(cmdtext,idx);
format(str,sizeof(str),"There are %d characters in this string",strlen(tmp));
SendClientMessage(playerid,0xAA3333AA,str);
return 1;
}