Chat im-game Doesnt works
#1

Hello all
I scripted a GM in which when we chat in-game when we press 'T' and type something and press enter the messege doesn't appears does any one knows how it can be fixed ?
Reply
#2

Show us the coding for "OnPlayerText"
Reply
#3

Код:
public OnPlayerText(playerid, text[])
{
    if(IpAds(text))
    {
	new string[128], Name[MAX_PLAYER_NAME];
	GetPlayerName(playerid,Name, sizeof(Name));
	format(string,sizeof(string),"%s(%d) has been banned.Reason:[Advertise]",Name,playerid);
	SendClientMessageToAll(COLOR_RED,string);
	SendClientMessageToAll(COLOR_RED,string);
	BanEx(playerid,"Advertise");
	return 0;
    }
	if(strlen(text) > 128) return 0;
	new to_others[MAX_CHATBUBBLE_LENGTH+1];
	format(to_others,MAX_CHATBUBBLE_LENGTH,"Says: %s",text);
	SetPlayerChatBubble(playerid,to_others,MESSAGE_COLOR,35.0,10000);
	new PlayerName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
	GetPlayerColor(playerid);
	format(text,1024, "%s{FFFFFF}({FFFFFF}%d{FFFFFF}): {FFFFFF}%s",PlayerName,playerid,text);
    SendClientMessageToAll(GetPlayerColor(playerid), text);
	return 0;
}
Reply
#4

Код:
 {
    new textv2[128], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof (name));
    format(textv2, sizeof (textv2), "%d >>> %s{6C0000}: %s", playerid, name, text);
    SendPlayerMessageToAll(playerid, textv2);
    return 0; 
    }
Should i add this ?
Reply
#5

im-game that's all i came to say.
Reply
#6

Quote:
Originally Posted by ic3cr3am
Посмотреть сообщение
im-game that's all i came to say.
Lol thanks for that
Reply
#7

Quote:
Originally Posted by maaz
Посмотреть сообщение
Код:
 {
    new textv2[128], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof (name));
    format(textv2, sizeof (textv2), "%d >>> %s{6C0000}: %s", playerid, name, text);
    SendPlayerMessageToAll(playerid, textv2);
    return 0; 
    }
Should i add this ?
yea use it it may work the chat
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)