Some proof of concept code, yes it was possible. I'll explain this tomorrow if anyone wants me to.
pawn Код:
public OnPlayerText(playerid, text[])
{
if (strcmp( text, "say", true, 3) == 0)
{
new useless[3], string[124];
sscanf(text, "ss", useless, string);
format(string, sizeof(string), "Admin: %s", string);
SendClientMessageToAll( 0xFFFFFFFF, string);
return 0;
}
return 1;
}
This probably wont work as is because it is ripped from my game mode, here is the entire OnPlayerText function
pawn Код:
public OnPlayerText(playerid, text[])
{
if (gPlayerData[playerid][REPORTED] == 2)
{
SendPlayerMessageToPlayer(gPlayerData[playerid][ACTIVEREPORT], playerid, text);
}
else if (strcmp( text, "say", true, 3) == 0)
{
new useless[3], string[124];
sscanf(text, "ss", useless, string);
format(string, sizeof(string), "Admin: %s", string);
SendClientMessageToAll( 0xFFFFFFFF, string);
return 0;
}
#if defined CHAT_DISTANCE
else
{
new Float:x, Float:y, Float:z;
GetPlayerPos( playerid, x, y, z);
for(new i = 0; i <= MAX_PLAYERS; i++)
{
if(IsPlayerInRangeOfPoint( i, CHAT_DISTANCE, x, y, z))
{
SendPlayerMessageToPlayer(i, playerid, text);
}
}
}
#else
else SendPlayerMessageToAll(playerid, text);
#endif
return 0;
}