[Ajuda] Erro Chat
#1

Olб estava fazendo um chat global mais quando chamei meu amigo pra testar aparece 2 vez no chat quando mando mensagem e ele tbm alguem pode me ajudar? :-; e quando eu falo aparace o @ eu nгo quero que apareca ele

Код:
{

	new
		pname[MAX_PLAYER_NAME],
		pcolor = GetPlayerColor(playerid),
		str[128];

	GetPlayerName(playerid, pname, MAX_PLAYER_NAME);

	format(str, sizeof(str), "{8c7373}@Sobrevivente %s (%d): %s", pname, playerid, text);

	new
		Float:x,
		Float:y,
		Float:z;

	GetPlayerPos(playerid, x, y, z);

	foreach(new i : Player) {
		if(text[0] == '@' && text[1]) { 
	SendClientMessageToAll(pcolor, str);
		}
	}
	return 0;
}
Reply
#2

Troque:
Код:
foreach(new i : Player) {
		if(text[0] == '@' && text[1]) { 
	SendClientMessageToAll(pcolor, str);
Por:
Код:
foreach(new i : Player) {
		if(text[0] == '@' && text[1]) { 
	SendClientMessage(i, pcolor, str);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)