25.08.2009, 19:59
Here,
You can use mine:
You can use mine:
pawn Код:
if(strcmp(cmd, "/me", true) == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
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, red, "USAGE: /me [action]");
return 1;
}
else
{
format(string, sizeof(string), "* %s %s", sendername, result);
}
ProxDetector(30.0, playerid, string, red,red,red,red,red);
printf("%s", string);
return 1;
}