09.05.2009, 11:59
Quote:
|
Originally Posted by Andom
You are not sending a client message to anyone.
|
You can use myne if you want, it also stores what the person said in the log file.
Код:
if(strcmp(cmd, "/me", true) == 0)
{
new pname[18];
GetPlayerName(playerid, pname, sizeof(pname));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /me [action]");
return 1;
}
format(string, sizeof(string), "%s %s", pname, result);
ProxDetector(10, playerid, string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
printf("Local Chat (/me): %s(%d): %s", pname, playerid, result);
}

