Chat problems
#1

Hello guys!

Haven't been here for a while .

I'm encountering the problem.Everything is working fine:
  1. The colors
  2. Chat bubble
  3. Animation
  4. And range
But it doesn't send any message :/.Why is that?

pawn Код:
public OnPlayerText(playerid, text[])
{
    if(!IsPlayerInAnyVehicle(playerid))
    {
        new Length = strlen(text);
        new aTime = Length*200;
        ApplyAnimation(playerid,"PED","IDLE_CHAT",4.1,1,1,1,0,aTime);
    }
    if(PlayerInfo[playerid][pAdmin] >= 1)
    {
        SetPlayerChatBubble(playerid, text, COL_ADMINGREEN, 50.0, 4000);
        return 0;
    }
    else if(PlayerInfo[playerid][pAdmin] == 0)
    {
        SetPlayerChatBubble(playerid, text, COL_WHITE, 50.0, 4000);
        return 0;
    }
    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"TCRED"]: "TCCYAN"%s", name, text[0]);
    strreplace(name, '_', ' ');
    for(new i = 0; i < MAX_PLAYERS; ++i)
    {
        if(IsPlayerInRangeOfPoint(i, 5, X, Y, Z))
        {
            if(PlayerInfo[playerid][pAdmin] >= 1)
            {
                SendClientMessage(i,COL_ADMINGREEN,string);
                return 1;
            }
            else if(PlayerInfo[playerid][pAdmin] == 0)
            {
                SendClientMessage(i,COL_WHITE,string);
                return 1;
            }
        }
    }
    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: 4 Guest(s)