15.08.2010, 20:01
How can I make the Chat that is on the server at the start so it will say Luis_Geramia says: Hello but only the player('s) near you can hear?
for(new i = 0; i < MAX_PLAYERS; i++)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z); // playerid is = the player who talks
if(IsPlayerInRangeOfPoint(i, x, y, z, 20.0))
{
format(string, sizeof(string), "%s says: %s", playername, textstring);
SendClientMessage(i, color, string);
}
}
public OnPlayerText(playerid, text[])
{
return 1;
}
LimitGlobalChatRadius(5.0);