real chat help
#5


pawn Код:
stock SendPlayerLocalChat(playerid, color, string[], radius)
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid,X,Y,Z);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInRangeOfPoint(i,radius,X,Y,Z)
{
SendClientMessage(i,color,string);
}
}
}
return 1;
}

now when you use this you need to format the string, say like this:

pawn Код:
new string[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(string,sizeof(string),%s(%d) says: %s",name, playerid, message);
SendPlayerLocalChat(playerid,0xFFFFFFF,string,10);
Reply


Messages In This Thread
real chat help - by CharlieScene - 05.12.2009, 01:25
Re: real chat help - by Correlli - 05.12.2009, 01:30
Re: real chat help - by CharlieScene - 05.12.2009, 01:31
Re: real chat help - by *ToM* - 05.12.2009, 01:45
Re: real chat help - by pagie1111 - 05.12.2009, 09:08
Re: real chat help - by CharlieScene - 05.12.2009, 18:01
Re: real chat help - by [NYRP]Mike. - 05.12.2009, 18:26

Forum Jump:


Users browsing this thread: 1 Guest(s)