19.06.2012, 16:53
There's a few issues with your script.
These string don't need to be that big, the max displayable characters in SAMP are 128.
You also should add a return at this piece of code:
So the script 'halts' at that line and doesn't continue.
You also don't return 1; on the bottom of the command.
I have no idea how to use strtok, so I won't comment on additional bugfixes, I myself prefer zcmd and sscanf as that's way easier to use and to-date.
pawn Код:
new gMessage[256];
new Message[256];
You also should add a return at this piece of code:
pawn Код:
if(!strlen(tmp))
{
SendClientMessage(playerid,COLOR_WHITE,"Usage: /sms [number] [message]");
}
pawn Код:
if(!strlen(gMessage))
{
SendClientMessage(playerid,COLOR_WHITE,"Usage: /sms [number] [message]");
}
You also don't return 1; on the bottom of the command.
I have no idea how to use strtok, so I won't comment on additional bugfixes, I myself prefer zcmd and sscanf as that's way easier to use and to-date.