How to make a chat
#1

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

Use IsPlayerInRangeOfPoint and a loop through all players. Get the players position and check if someone is near -> send.
Reply
#3

Or you can use LimitGlobalChatRadius function.
Reply
#4

Jochemd i dont know how to make it pleas can you ? i will put you in credits
Reply
#5

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)