08.07.2011, 09:26
i have a problem with /me command.
it works, but it writes only one word.
code:
it works, but it writes only one word.
code:
PHP код:
if(strcmp( cmd, "/me", true ) == 0 )
{
if(IsPlayerConnected(playerid))
{
new result[128];
result = strtok(cmdtext,idx);
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /me [action]");
return 1;
}
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
new string[128];
format(string,sizeof(string),"*%s %s",sendername, result);
ProxDetector(20.0, playerid, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
}
return 1;
}