22.01.2012, 00:56
pawn Код:
if(!strcmp(cmdtext,"/me",true,3))
{
if(!strlen(cmdtext[4])) return SendClientMessage(playerid,-1,"Usage: /me [text]");
new Float:P[4],Nick[24],str[128];
GetPlayerName(playerid,Nick,24);
GetPlayerPos(playerid,P[0],P[1],P[2]);
format(str,sizeof(str),"(me) %s: %s",Nick,cmdtext[4]);
for(new d,g=GetMaxPlayers(); d < g; d++)
if(IsPlayerConnected(d))
{
P[3] = GetPlayerDistanceFromPoint(d,P[0],P[1],P[2]);
if(P[3] <= YOUR_DISTANCE) // example 10.0
SendClientMessage(d,-1,str);
}
return 1;
}