26.10.2017, 22:41
pawn Код:
public OnPlayerText(playerid, text[]) {
new
pname[MAX_PLAYER_NAME],
pcolor = GetPlayerColor(playerid),
str[128];
GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
format(str, sizeof(str), "%s [Local] diz: {ffffff}%s", pname, text);
new
Float:x,
Float:y,
Float:z;
GetPlayerPos(playerid, x, y, z);
foreach(new i : Player) {
//
// 30.0 й o range que a mensagem alcanзa
// streamedin й para ter certeza que estгo no mesmo interior/vw
if(IsPlayerStreamedIn(playerid, i) && IsPlayerInRangeOfPoint(i, 30.0, x, y, z)) {
SendClientMessage(i, pcolor, str);
}
}
//
// OnPlayerText deve retornar 0 para anular o chat padrгo do sa-mp
return 0;
}
pawn Код:
if(text[0] == '@' && text[1]) { // checa se hб continuidade apуs o @
SendClientMessageToAll..
}