How to make a 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: How to make a chat (
/showthread.php?tid=255082)
How to make a chat -
Djankaa - 14.05.2011
I need help how can i make IC chat but that can everybody see that just the people how are 5 metars from him
sry for bad english
Re: How to make a chat -
Jochemd - 14.05.2011
Use IsPlayerInRangeOfPoint and a loop through all players. Get the players position and check if someone is near -> send.
Re: How to make a chat -
Raimis_R - 14.05.2011
Or you can use LimitGlobalChatRadius function.
Re: How to make a chat -
Djankaa - 14.05.2011
Jochemd i dont know how to make it pleas can you ? i will put you in credits
Re: How to make a chat -
Raimis_R - 14.05.2011
pawn Код:
new
Float:Pos[ 3 ]
;
GetPlayerPos( playerid,Pos[ 0 ], Pos[ 1 ], Pos[ 2 ] );
for( new i = 0; i != MAX_PLAYERS; i++ )
{
if( !IsPlayerConnected( i )) continue;
if( IsPlayerInRangeOfPoint( i,Radius,Pos[ 0 ], Pos[ 1 ], Pos[ 2 ] ) )
{
SendClientMessage( i,COLOR,"TEXT" );
}
}
Or like i said use LimitGlobalChatRadius( Radius ); and put in OnGameModeInit