OnPlayerText Help
#1

I need a little help with OnPlayerText, this my code
Код:
format(strg, sizeof(strg), "{808080}(%d):{FFFFFF}%s", playerid, text);
    SendPlayerMessageToAll(playerid, strg);
    format(strg, sizeof(strg), "%s", text);
	SetPlayerChatBubble(playerid, strg, COLOR_WHITE, 50.0, 1000*10);
and this code will be like this

and i don't want like this ^

i want to be like this

can help ?
Reply
#2

pawn Код:
format(strg, sizeof(strg), "{FFFFFF}[%d]:%s", playerid, text);
SendPlayerMessageToAll(playerid, strg);
format(strg, sizeof(strg), "%s", text);
SetPlayerChatBubble(playerid, strg, COLOR_WHITE, 50.0, 1000*10);
Reply
#3

dude!, i want to be like this
Код:
Tazmania(12): LoL
not like this
Код:
Tazmania: (12): LoL
Reply
#4

from my Gamemode;
pawn Код:
new textString[500], pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pName, sizeof(pName));
    format(textString, sizeof(textString), "{%06x}%s {808080}(ID: %d): {FFFFFF}%s", (GetPlayerColor(playerid) >>> 8), pName, playerid, text);
    SendClientMessageToAll(-1, textString);
    SetPlayerChatBubble(playerid, textString, COLOR_WHITE, 50.0, 1000*10);
EDIT :-

Try This too;
pawn Код:
new pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pName, sizeof(pName));
    format(strg, sizeof(strg), "{%06x}%s {808080}(ID: %d): {FFFFFF}%s", (GetPlayerColor(playerid) >>> 8), pName, playerid, text);
    SendPlayerMessageToAll(playerid, strg);
    format(strg, sizeof(strg), "%s", text);
    SetPlayerChatBubble(playerid, strg, COLOR_WHITE, 50.0, 1000*10);
NOTE :-

OnPlayerText must have "return 0;" so it won't show the default one, but shows the custom one.

For Example :-
pawn Код:
public OnPlayerText(playerid, text[])
{
    new pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pName, sizeof(pName));
    format(strg, sizeof(strg), "{%06x}%s {808080}(ID: %d): {FFFFFF}%s", (GetPlayerColor(playerid) >>> 8), pName, playerid, text);
    SendPlayerMessageToAll(playerid, strg);
    format(strg, sizeof(strg), "%s", text);
    SetPlayerChatBubble(playerid, strg, COLOR_WHITE, 50.0, 1000*10);
    return 0;
}
or
pawn Код:
public OnPlayerText(playerid, text[])
{
    new textString[500], pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pName, sizeof(pName));
    format(textString, sizeof(textString), "{%06x}%s {808080}(ID: %d): {FFFFFF}%s", (GetPlayerColor(playerid) >>> 8), pName, playerid, text);
    SendClientMessageToAll(-1, textString);
    SetPlayerChatBubble(playerid, textString, COLOR_WHITE, 50.0, 1000*10);
    return 0;
}
Reply
#5

Quote:

public OnPlayerText(playerid, text[])
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
format(strg, sizeof(strg), "{%06x}%s {808080}(ID: %d): {FFFFFF}%s", (GetPlayerColor(playerid) >>> , pName, playerid, text);
SendPlayerMessageToAll(playerid, strg);
format(strg, sizeof(strg), "%s", text);
SetPlayerChatBubble(playerid, strg, COLOR_WHITE, 50.0, 1000*10);
return 0;
}

LOL they will be like this

Код:
Tazmania: Tazmania(12) LOL
Reply
#6

btw its Solved! Thanks
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)