SA-MP Forums Archive
[Ajuda] SetPlayerChatBubble - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] SetPlayerChatBubble (/showthread.php?tid=363204)



SetPlayerChatBubble - iDeagle_Hurley - 26.07.2012

tipo usando este code a baixo tem como definir ele so pra aparecer se o admin estiver em modo trabalho
exemplo de cmd admin em modo trabalho:

pawn Код:
public TextAdmin()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(PlayerInfo[i][pAdmin] >= 1)
        {
            SetPlayerChatBubble(i, "{00FFFF}..: Administrador :..", COLOR_RED, 100.0, 10000);
        }
    }
}
}


pawn Код:
if(strcmp(cmdtext, "/trampar", true) == 0)
    {
        if(PlayerInfo[playerid][pJailed] != 0)
        {
            MSGPLAYER(playerid,COLOR_YELLOW," Vocк nгo pode trabalhar na cadeia!");
            return 1;
        }
        if(PlayerInfo[playerid][pAdmin] >= 1)
        {
            if(admtrampando[playerid] > 0)
            {
                admtrampando[playerid] = 0;
                GetPlayerName(playerid,sendername,sizeof(sendername));
                MSGPARATODOS(COLOR_GRAD2, "(=-=-=-=-=-=-=-=-=-=( {FF8C00}Aviso Da Administraзгo{BFC0C2} )=-=-=-=-=-=-=-=-=-=)");
                format(string, 128, "Admin: %s ID(%d) estб Jogando, Veja em /admins.",sendername, playerid);
                MSGPARATODOS(0xFF1CAEFF, string);
                KillTimer(TempoAdministrador);
                SetPlayerToTeamColor(playerid);
                ResetPlayerWeaponsEx(playerid);
                SetPlayerHealth(playerid,100);
                SetPlayerSkin(playerid,skinadm[playerid]);
                getdate(year, month, day);
                gettime(hour,minute,second);
                format(gstring, sizeof(gstring), "%s esta jogando [%d/%d/%d - %d:%d:%d]\n", PlayerName(playerid), day, month, year, hour, minute, second);
                //AdminLog(gstring);
            }
            else
            {
                admtrampando[playerid] = 1;
                GetPlayerName(playerid,sendername,sizeof(sendername));
                MSGPARATODOS(COLOR_GRAD2, "(=-=-=-=-=-=-=-=-=-=( {FF8C00}Aviso Da Administraзгo{BFC0C2} )=-=-=-=-=-=-=-=-=-=)");
                format(string, 128, "Admin: %s ID(%d) estб Trabalhando, veja em /admins.",sendername, playerid);
                MSGPARATODOS(0xFF1CAEFF, string);
                SetPlayerToTeamColor(playerid);
                TempoAdministrador = SetTimerEx("Administrador", 1000, true, "i", playerid);
                skinadm[playerid] = GetPlayerSkin(playerid);
                SetPlayerSkin(playerid,217);
                getdate(year, month, day);
                gettime(hour,minute,second);
                format(gstring, sizeof(gstring), "%s esta trabalhando [%d/%d/%d - %d:%d:%d]\n", PlayerName(playerid), day, month, year, hour, minute, second);
                //AdminLog(gstring);
           }
        }
        return 1;
    }
ajudee pf dou +repu


Re: SetPlayerChatBubble - .FuneraL. - 26.07.2012

pawn Код:
public TextAdmin()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(PlayerInfo[i][pAdmin] > 0 && admtrampando > 0)
        {
            SetPlayerChatBubble(i, "{00FFFF}..: Administrador :..", COLOR_RED, 100.0, 10000);
        }
    }
}
Tente se nгo der, troque o && pelo ||


Re: SetPlayerChatBubble - iDeagle_Hurley - 26.07.2012

Quote:
Originally Posted by .FuneraL.
Посмотреть сообщение
pawn Код:
public TextAdmin()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(PlayerInfo[i][pAdmin] > 0 && admtrampando > 0)
        {
            SetPlayerChatBubble(i, "{00FFFF}..: Administrador :..", COLOR_RED, 100.0, 10000);
        }
    }
}
Tente se nгo der, troque o && pelo ||
deu um erro olhe aki:

pawn Код:
C:\Users\Windows 7\Desktop\samp03e_svr_win32 (1)\gamemodes\Bac.pwn(19147) : warning 217: loose indentation
C:\Users\Windows 7\Desktop\samp03e_svr_win32 (1)\gamemodes\Bac.pwn(19149) : warning 217: loose indentation
C:\Users\Windows 7\Desktop\samp03e_svr_win32 (1)\gamemodes\Bac.pwn(54890) : warning 217: loose indentation
C:\Users\Windows 7\Desktop\samp03e_svr_win32 (1)\gamemodes\Bac.pwn(54895) : warning 217: loose indentation
C:\Users\Windows 7\Desktop\samp03e_svr_win32 (1)\gamemodes\Bac.pwn(61836) : warning 202: number of arguments does not match definition
C:\Users\Windows 7\Desktop\samp03e_svr_win32 (1)\gamemodes\Bac.pwn(69586) : error 033: array must be indexed (variable "admtrampando")
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
me ajude por favor dou +repu


Re: SetPlayerChatBubble - .FuneraL. - 26.07.2012

pawn Код:
public TextAdmin()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(PlayerInfo[i][pAdmin] > 0 && admtrampando[i] > 0)
        {
            SetPlayerChatBubble(i, "{00FFFF}..: Administrador :..", COLOR_RED, 100.0, 10000);
        }
    }
}
O Resto й Falta de Identaзгo


Re: SetPlayerChatBubble - Marlon_Lorran - 26.07.2012

admtranpando[i], esqueceu de colocar o [i]


Re: SetPlayerChatBubble - iDeagle_Hurley - 26.07.2012

Quote:
Originally Posted by .FuneraL.
Посмотреть сообщение
pawn Код:
public TextAdmin()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(PlayerInfo[i][pAdmin] > 0 && admtrampando[i] > 0)
        {
            SetPlayerChatBubble(i, "{00FFFF}..: Administrador :..", COLOR_RED, 100.0, 10000);
        }
    }
}
O Resto й Falta de Identaзгo
Funcionou Obrigado!
+REP - Pra tu uey


Re: SetPlayerChatBubble - victor304 - 28.07.2012

Double Post й foda carinha...


Respondi a sua pergunta no outro Topico que vocк fez, mais vocк nгo olhou .-.