help ! i want to do text on head
#2

pawn Код:
public OnPlayerText(playerid, text[])
{
    // Anti Adv
    if(AntiAdv(playerid, text)) return 0;
    // The Rest
    new string[128];
    // Normal Calling
    if(BeingCalled[playerid] == 2 || Calling[playerid] == 2 || Call911[playerid])
    {
        if(strlen(PlayerInfo[playerid][pAccent])) format(string, sizeof(string), "[Cellphone] %s: [%s Accent] %s", RPN(playerid), PlayerInfo[playerid][pAccent], text);
        else format(string, sizeof(string), "[Cellphone] %s: %s", RPN(playerid), text);
        if(!Call911[playerid])
        {
            if(BeingCalled[playerid] == 2) SendClientMessage(Caller[playerid], COLOR_YELLOW, string);
            else if(Calling[playerid] == 2) SendClientMessage(Called[playerid], COLOR_YELLOW, string);
        }
    }
    else if(Live[playerid])
    {
        if(IsNewsVehicle(GetPlayerVehicleID(playerid)))
        {
            format(string, sizeof(string), "** [Live News]: %s: %s", RPN(playerid), text);
            SendClientMessageToAll(COLOR_LIGHTGREEN, string);
        }
    }
    else
    {
        if(strlen(PlayerInfo[playerid][pAccent])) format(string, sizeof(string), "%s says: [%s Accent] %s", RPN(playerid), PlayerInfo[playerid][pAccent], text);
        else format(string, sizeof(string), "%s says: %s", RPN(playerid), text);
    }
    SendNearbyMessage(playerid, 10, string, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
    Log("logs/chat.log", string);
    // 911
    if(Calling[playerid] && Call911[playerid])
    {
        if(Call911[playerid] == 1)
        {
            format(D911[playerid], 12, "%s", text);
            Call911[playerid] = 2;
            SendClientMessage(playerid, COLOR_YELLOW, "[Cellphone]: What is your current location?");
        }
        else if(Call911[playerid] == 2)
        {
            Call911[playerid] = 0;
            Calling[playerid] = 0;
            SendClientMessage(playerid, COLOR_YELLOW, "[Cellphone]: аНТЕиТ , аГТдґйГСєКТВўН§¤ШібЕйЗ аЁйТЛ№йТ·ХиЁР件֧г№дБиЄйТ.");
            SendClientMessage(Caller[playerid], COLOR_ORANGE, " They hungup the line.");
            format(string, sizeof(string), "{2641FE}Dispatch: {FFFFFF}БХКТВаГХВЎаўйТ ЁТЎаєНГмв·ГИСѕ·м %d (( в»ГґѕФБ /track %d ))", PlayerInfo[playerid][pCellphone], playerid);
            SendClientMessage(playerid, COLOR_WHITE, string);
            format(string, sizeof(string), "{2641FE}Emergency: {FFFFFF}%s", D911[playerid]);
            SendClientMessage(playerid, COLOR_WHITE, string);
            format(string, sizeof(string), "{2641FE}Location: {FFFFFF}%s", text);
            SendClientMessage(playerid, COLOR_WHITE, string);
            format(D911[playerid], 128, "");
            SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE);
        }
    }
    /*format(OldSpamChat[playerid], 128, "%s", NewSpamChat[playerid]);
    format(NewSpamChat[playerid], 128, "%s", text);
    if(strlen(OldSpamChat[playerid]) > 0 && strlen(NewSpamChat[playerid]) > 0)
    {
        if(!strcmp(OldSpamChat[playerid], NewSpamChat[playerid], false))
        {
            ChatSpamCount[playerid] ++;
            if(ChatSpamCount[playerid] >= 8)
            {
                format(string, sizeof(string), "AdmCmd: %s has been autokicked, reason: Spam", RPN(playerid));
                SendClientMessageToAll(COLOR_LIGHTRED, string);
                ChatSpamCount[playerid] = 0;
                Kick(playerid);
            }
        }
        else
        {
            ChatSpamCount[playerid] = 0;
        }
    }*/

    SetPlayerChatBubble(playerid, text, 0xFF0000FF, 100.0, 10000);
    return 0;
}
Reply


Messages In This Thread
help ! i want to do text on head - by sofano - 14.12.2012, 15:41
Re: help ! i want to do text on head - by [HK]Ryder[AN] - 14.12.2012, 15:51

Forum Jump:


Users browsing this thread: 1 Guest(s)