25.07.2012, 09:10
pawn Код:
if(!strcmp(cmdtext, "/me", true, 3)) // 3 is the length of /me
{
if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /me [action]");
new str[128];
GetPlayerName(playerid, str, sizeof(str));
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
new Float:Pos[3];
format(str, sizeof(str), "* %s %s", str, cmdtext[4]);
for(new i; i < MAX_PLAYERS; i++)
{
// 5 is the range
if(IsPlayerInRangeOfPoint(i, Pos[0], Pos[1], Pos[2], 5))
SendClientMessage(i, str, 0xFFFF00AA);
}
return 1;
}