Local Chat - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Local Chat (
/showthread.php?tid=168314)
Local Chat -
Luis- - 15.08.2010
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?
Re: Local Chat -
Niixie - 15.08.2010
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?
Re: Local Chat -
Luis- - 15.08.2010
Were would i add that?
Re: Local Chat -
vital2k - 15.08.2010
pawn Код:
public OnPlayerText(playerid, text[])
{
return 1;
}
Re: Local Chat -
Mike Garber - 15.08.2010
LOL no just do
pawn Код:
LimitGlobalChatRadius(5.0);
Under "OnGameModeInit" and It's done. Change 5.0 to how many meters you want.
Re: Local Chat -
Luis- - 15.08.2010
Okay :/, It is still not doing it..
Re: Local Chat -
Niixie - 16.08.2010
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...
Re: Local Chat -
wups - 16.08.2010
Works all the time 4 me.