25.12.2013, 12:34
Another one..
pawn Код:
public OnPlayerText(playerid, text[])
{
new PlayerName[MAX_PLAYER_NAME]; GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
new String[128]; format(String, sizeof(String), "%s[%d]: %s", PlayerName, playerid, text);
new Float:Pos[3]; GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && IsPlayerInRangeOfPoint(i, 10.0, Pos[0], Pos[1], Pos[2]))
{
SendClientMessage(i, -1, String);
}
}
return 0;
}