public OnPlayerText(playerid, text[])
{
new str[200];
new str1[200];
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
format(str, sizeof(str),\"%s: %s\",pName(playerid),text);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(i == playerid)
{
format(str1, sizeof(str1),\"Te: %s\",text);
SendClientMessage(playerid, -1, str1);
}
if(IsPlayerInRangeOfPoint(i, 10.0, x, y, z))
{
SendClientMessage(i, -1, str);
}
}
}
return 0;
}
stock pName(playerid)
{
new n[24+1];
GetPlayerName(playerid, n, sizeof(n));
return n;
}
Nem teszteltem, azt hiszem jó.