21.01.2014, 17:21
pawn Code:
public OnPlayerText(playerid, text[]) {
new i, Float:Pos[3], str[128], Nome[MAX_PLAYER_NAME];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
GetPlayerName(playerid, Nome, MAX_PLAYER_NAME);
format (str, 128, "%s diz %s", Nome, text);
for ( i = 0; i < MAX_PLAYERS; ++i) {
if ( IsPlayerConnected(i) && IsPlayerInRangeOfPoint(playerid, 10.0, Pos[0], Pos[1], Pos[2]) ) {
SendClientMessage(i, -1, str);
PlayerPlaySound(i, 0.0, 0.0, 0.0);
}
}
return 0;
}