Local Chat
#1

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?
Reply
#2

do

pawn Код:
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);
     }
}
you see?
Reply
#3

Were would i add that?
Reply
#4

pawn Код:
public OnPlayerText(playerid, text[])
{
    return 1;
}
Reply
#5

LOL no just do
pawn Код:
LimitGlobalChatRadius(5.0);
Under "OnGameModeInit" and It's done. Change 5.0 to how many meters you want.
Reply
#6

Okay :/, It is still not doing it..
Reply
#7

Quote:
Originally Posted by Mike Garber
Посмотреть сообщение
LOL no just do
pawn Код:
LimitGlobalChatRadius(5.0);
Under "OnGameModeInit" and It's done. Change 5.0 to how many meters you want.
Part time doesnt work. Own functions is more trustable, so use the one i made...
Reply
#8

Works all the time 4 me.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)