OnPlayerText
#7

pawn Код:
public OnPlayerText(playerid, text[])
{
    if(!PlayerLogin[playerid]) return 0;
    if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT && !PlayerCuffed{playerid})
    {
        if(!IsAGang(playerid)) ApplyAnimation(playerid, "PED", "IDLE_CHAT", 4.0, 0, 1, 1, 1, 1, 1);
        else
        {
            new gsign[7][9] = {"gsign2", "gsign4LH", "gsign3LH", "gsign4", "gsign2LH", "gsign5", "gsign5LH"};
            ApplyAnimation(playerid, "GHANDS", gsign[random(7)], 4.0, 0, 1, 1, 1, 1, 1);
        }
        SetTimerEx("ClearAnim", 2000, 0, "i", playerid);
    }
    new string[144], rdist, c = 0xFFFFFFFF, myWorld = GetPlayerVirtualWorld(playerid);
    if(!FormaFrac[playerid]) format(string, sizeof(string), "- %s (%s)[%d]", text, PlayerInfo[playerid][pNamePlayer], playerid);
    else format(string, sizeof(string), "- %s {%s}(%s)[%d]", text, GetFractionColor[PlayerInfo[playerid][pMember]], PlayerInfo[playerid][pNamePlayer], playerid);
    foreach(new i: Player)
    {
        if(myWorld  != GetPlayerVirtualWorld(i)) continue;
        rdist = floatround(GetPlayerDistanceToPlayer(playerid, i));
        if(rdist > 14.0) continue;
        if(rdist > 8.0) c = 0xAAAAAAFF;
        else if(rdist > 4.0) c = 0xCCCCCCFF;
        SendClientMessage(i, c, string);
    }
    SetPlayerChatBubble(playerid, text, COLOR_WHITE, 20.0, 10000);
    return 0;
}
Reply


Messages In This Thread
OnPlayerText - by FaGo - 03.08.2016, 13:57
Re: OnPlayerText - by Diman777 - 03.08.2016, 15:12
Re: OnPlayerText - by Romz - 03.08.2016, 15:25
Re: OnPlayerText - by FaGo - 03.08.2016, 17:44
Re: OnPlayerText - by Mutha_X - 03.08.2016, 18:40
Re: OnPlayerText - by FaGo - 03.08.2016, 22:23
Re: OnPlayerText - by OKStyle - 17.08.2016, 07:15
Re: OnPlayerText - by ZiGGi - 17.08.2016, 13:33
Re: OnPlayerText - by OKStyle - 17.08.2016, 17:14
Re: OnPlayerText - by Mutha_X - 17.08.2016, 17:36
Re: OnPlayerText - by OKStyle - 17.08.2016, 17:45
Re: OnPlayerText - by Mutha_X - 17.08.2016, 17:56
Re: OnPlayerText - by ZiGGi - 17.08.2016, 19:41

Forum Jump:


Users browsing this thread: 1 Guest(s)