Chat Problem
#1

Hellu,
I have one problem, When i type anything in chat, it comes up two times.
look at the picture down below.

here are the codes:
Код:
public OnPlayerText(playerid, text[])
{
//===============================================
	new string[500], playername[MAX_PLAYER_NAME];
	GetPlayerName(playerid, playername, sizeof(playername));
	if (AccInfo[playerid][pVip] >= 1 || AccInfo[playerid][Level] > 1)
		format(string, sizeof(string), "%s {%06x}[%d]: {%06x}%s", playername, (AccInfo[playerid][IdColor] >>> 8), playerid, (AccInfo[playerid][ChatColor] >>> 8), text);
	else
		format(string, sizeof(string), "%s {FFFFFF}(%d){%06x}: {FFFFFF}%s", playername, playerid, (GetPlayerColor(playerid) >>> 8), text);
	SendClientMessageToAll(GetPlayerColor(playerid), string);
	return 1;
}
Reply
#2

Hello!

Maybe it will work if you write return 0; instead of return 1;

- Mencent
Reply
#3

Код:
public OnPlayerText(playerid, text[])
{
//===============================================
	new string[500], playername[MAX_PLAYER_NAME];
	GetPlayerName(playerid, playername, sizeof(playername));
	if (AccInfo[playerid][pVip] >= 1 || AccInfo[playerid][Level] > 1) format(string, sizeof(string), "%s {%06x}[%d]: {%06x}%s", playername, (AccInfo[playerid][IdColor] >>> 8), playerid, (AccInfo[playerid][ChatColor] >>> 8), text);
	else	format(string, sizeof(string), "%s {FFFFFF}(%d){%06x}: {FFFFFF}%s", playername, playerid, (GetPlayerColor(playerid) >>> 8), text);
	SendClientMessageToAll(GetPlayerColor(playerid), string);
	return 0;
}
Reply
#4

Код:
public OnPlayerText(playerid, text[])
{
//===============================================
	new string[500], playername[MAX_PLAYER_NAME];
	GetPlayerName(playerid, playername, sizeof(playername));
	if (AccInfo[playerid][pVip] >= 1 || AccInfo[playerid][Level] > 1)
		format(string, sizeof(string), "%s {%06x}[%d]: {%06x}%s", playername, (AccInfo[playerid][IdColor] >>> 8), playerid, (AccInfo[playerid][ChatColor] >>> 8), text);
	else
		format(string, sizeof(string), "%s {FFFFFF}(%d){%06x}: {FFFFFF}%s", playername, playerid, (GetPlayerColor(playerid) >>> 8), text);
	SendClientMessageToAll(GetPlayerColor(playerid), string);
	return 0;
}
Reply
#5

Fixed. thanks mencent
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)