It depends what kind of chat - global / local.
Look under OnplayerText, and see if there is a format command you can change.
eg
pawn Код:
public OnPlayerText(playerid,text[])
{
new string[164],name[24];
GetPlayerName(playerid, name, sizeof(name));
format(string,sizeof(string),"%s [%d] : %s",name,playerid,text);
ProxDetector(20.0,playerid,string,0xAFAFAFAA);
return 0;
}
and you will need these in your script too
pawn Код:
stock ProxDetector(Float:radi, playerid, string[],color)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(GetPlayerVirtualWorld(i) == virtualworld)
{
if(GetPlayerInterior(i) == interior)
{
new Float:dist = GetDistanceBetweenPlayers(i,playerid);
if(dist < radi && dist > 0)
{
SendClientMessage(i, color, string);
}
}
}
}
}
return 1;
}
stock Float:GetDistanceBetweenPlayers(p1,p2)
{
new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
if(!IsPlayerConnected(p1) || !IsPlayerConnected(p2))
{
return -1.00;
}
if(!GetPlayerInterior(p1) != !GetPlayerInterior(p2))
{
return -1.00;
}
GetPlayerPos(p1,x1,y1,z1);
GetPlayerPos(p2,x2,y2,z2);
return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
}
I have not tested any of this but you should be able to get it working.