OnPlayerText Help
#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


Messages In This Thread
OnPlayerText Help - by TazmaNiax - 14.05.2014, 01:18
Re: OnPlayerText Help - by Lynn - 14.05.2014, 01:28
Re: OnPlayerText Help - by TazmaNiax - 14.05.2014, 01:47
Re: OnPlayerText Help - by SAMProductions - 14.05.2014, 01:54
Re: OnPlayerText Help - by TazmaNiax - 14.05.2014, 02:09
Re: OnPlayerText Help - by TazmaNiax - 14.05.2014, 02:13

Forum Jump:


Users browsing this thread: 2 Guest(s)