11.04.2012, 19:15
I'm trying to make the /me command for my RP server. So when I type in /me walks up to the table; it should print out "Gytis0 walks up to the table". But my problem is, I made the command, but it only prints out one word. So when I type in "/me walks up to the table" it prints out just "Gytis0 walks".
Here's the code.
Please help me fix this. And please, don't tell me to convert to ZCMD, it may be more efficient, but I already made too many commands to convert to ZCMD.
Here's the code.
pawn Код:
if(strcmp(cmd, "/me",true)==0)
{
new string[128];
string = strtok(cmdtext, idx);
if(strlen(string)==0) return SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /me [action]");
format(string, sizeof(string), "%s %s ", RPName( playerid ), string);
printf("%s", string);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return 1;
}