SA-MP Forums Archive
Chat Problem - 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)
+--- Thread: Chat Problem (/showthread.php?tid=572986)



Chat Problem - StR_MaRy - 03.05.2015

hi to all , can some1 help me with this question?

when some1 enter on my server they can't speak on chat "T"

Quote:

new realchat = 1;

Quote:

if (realchat)
{
if(gPlayerLogged[playerid] == 0)
{
return 0;
}
if (PlayerInfo[playerid][pAdmin] >= 1)
{
new Colors[] = { COLOR_WHITE, COLOR_YELLOW, COLOR_LIGHTGREEN, COLOR_WHITE, TEAM_GROVE_COLOR, 0x008100AA };
SetPlayerChatBubble(playerid, text, Colors[random(sizeof(Colors))], 50.0, 5000);
}
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s: %s", sendername, text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_F ADE4,COLOR_FADE5);
return 0;
}

this is my realchat system , same on other GameModes can some1 help me ?


Re: Chat Problem - Nenzittow - 03.05.2015

Код:
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s: %s", sendername, text);
SendClientMessageToAll(playerid, string);
Or just use this:

Код:
public OnPlayerText(playerid, text[])
{
	new string[256], Name[MAX_PLAYER_NAME];
	GetPlayerName(playerid, Name, sizeof(Name));
	format(string, sizeof string,"{FFFFFF}%s{FFFFFF} [%d] %s", Name, playerid, text);
	SendClientMessageToAll(playerid, string);
	return 0;
}



Re: Chat Problem - StR_MaRy - 03.05.2015

and if i want to speak only with a friend closer not from ls to lv on "T" how can i ?

because sendclientmessagetoall send a msj to all players

this is not working they give me two messages


Re: Chat Problem - Nenzittow - 03.05.2015

https://sampwiki.blast.hk/wiki/LimitGlobalChatRadius

Use this.


Re: Chat Problem - StR_MaRy - 03.05.2015

thx man i honor you