Chat problems
#4

I'm assuming this is what you want.
pawn Код:
public OnPlayerText(playerid, text[])
{
    if(!IsPlayerInAnyVehicle(playerid)) ApplyAnimation(playerid,"PED","IDLE_CHAT",4.1,1,1,1,0, (strlen(text) * 200));
    SetPlayerChatBubble(playerid, text, (PlayerInfo[playerid][pAdmin]) ? (COL_ADMINGREEN) : (COL_WHITE), 50.0, 4000);
    new name[MAX_PLAYER_NAME], string[150], Float:X, Float:Y, Float:Z;
    GetPlayerName(playerid, name, sizeof(name));
    GetPlayerPos(playerid, X, Y, Z);
    format(string, sizeof(string), ""TCWHITE"["TCRED"%s"TCWHITE"]: "TCCYAN"%s", name, text[0]);
    strreplace(name, '_', ' ');
    for(new i = 0; i < MAX_PLAYERS; ++i)
    {
        if(!IsPlayerConnected(i)) continue;
        if(IsPlayerInRangeOfPoint(i, 5.0, X, Y, Z)) SendClientMessage(i, (PlayerInfo[playerid][pAdmin]) ? (COL_ADMINGREEN) : (COL_WHITE), string);
    }
    return 0;
}
Reply


Messages In This Thread
Chat problems - by Dziugsas - 17.05.2014, 11:48
Re: Chat problems - by AroseKhanNiazi - 17.05.2014, 11:50
Re: Chat problems - by Dziugsas - 17.05.2014, 11:54
Re: Chat problems - by Threshold - 17.05.2014, 13:37
Re: Chat problems - by Dziugsas - 17.05.2014, 14:42

Forum Jump:


Users browsing this thread: 2 Guest(s)