21.08.2012, 11:48
Quote:
pawn Код:
|
Alternatively you can use:
if(strcmp(cmdtext, "/mycommand", true) == 0)
{
new string[145]; //You can replace 145 with the string size appropriate to your situation.
[/pawn]
The max string size for your text, including the null terminator, is approximately 108 cells. So remember to tell the player, or reject their request if their params are longer.
Example:
pawn Код:
if(!strlen(result)) return SendClientMessage(playerid, COLOR_GREEN, "{33CCFF}USAGE:{FFFFFF} /n [text]");
if(strlen(result) > 108) return SendClientMessage(playerid, COLOR_GREEN, "Your Message Must Be Less Than 108 Characters Long.");