13.03.2019, 02:04
PHP Code:
public OnPlayerText(playerid, text[])
{
if(Player[playerid][pAdminLevel] > 0)
{
new string[180], Float: pPos[3];
GetPlayerPos(playerid, pPos[0], pPos[1], pPos[2]);
format(string, sizeof(string), "%s %s[%d]: %s", GetPlayerAdminLevel(playerid), GetPlayerNameEx(playerid), playerid, text);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerInRangeOfPoint(i, 10.0, pPos[0], pPos[1], pPos[2]))
{
SendClientMessage(i ,-1, string);
}
}
}
return 0;
}

