SA-MP Forums Archive
[Ajuda] Ajuda ChatBubble - 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] Ajuda ChatBubble (/showthread.php?tid=315107)



[Ajuda] Ajuda ChatBubble - yuryroque - 01.02.2012

To tentando fazer um "ChatBubble" mas esta dando 4 erros

pawn Код:
public Adminmsg()
{
    for(new i = 0; i <= HighestID; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(AdminDuty[i] == 1 && PlayerInfo[i][pAdmin] > 0)
            {
                new sendername[MAX_PLAYER_NAME];
                new string[128];
                format(string, 128, "Admin %s: Posso ajudar ?", sendername);
                SetPlayerChatBubble( i, string, COLOR_YELLOW, 50.0, 9000);
            }
            else if(AdminAfk[i] == 1 && PlayerInfo[i][pAdmin] > 0)
            {
                new string[128];
                format(string, 128, "Admin %s: Estou ausente.", sendername);
                SetPlayerChatBubble( i, string, COLOR_GREEN, 50.0, 9000);
            }
            else if(PlayerInfo[i][pDonateRank] == 1)
            {
                new string[128];
                format(string, 128, "%s: V.I.P 1", sendername);
                SetPlayerChatBubble( i, string, COLOR_GREEN, 50.0, 9000);
            }
            else if(PlayerInfo[i][pDonateRank] == 2)
            {
                new string[128];
                format(string, 128, "%s: V.I.P 2", sendername);
                SetPlayerChatBubble( i, string, COLOR_GREEN, 50.0, 9000);
            }
            else if(PlayerInfo[i][pDonateRank] == 3)
            {
                new string[128];
                format(string, 128, "%s: V.I.P 3", sendername);
                SetPlayerChatBubble( i, string, COLOR_GREEN, 50.0, 9000);
            }
        }
    }
}

<<Os erros>>

Код:
C:\Documents and Settings\Yury Roque\Desktop\Sa-mp Server\gamemodes\gm.pwn(10577) : warning 235: public function lacks forward declaration (symbol "Adminmsg")
C:\Documents and Settings\Yury Roque\Desktop\Sa-mp Server\gamemodes\gm.pwn(10594) : error 017: undefined symbol "sendername"
C:\Documents and Settings\Yury Roque\Desktop\Sa-mp Server\gamemodes\gm.pwn(10600) : error 017: undefined symbol "sendername"
C:\Documents and Settings\Yury Roque\Desktop\Sa-mp Server\gamemodes\gm.pwn(10606) : error 017: undefined symbol "sendername"
C:\Documents and Settings\Yury Roque\Desktop\Sa-mp Server\gamemodes\gm.pwn(10612) : error 017: undefined symbol "sendername"



Re: [Ajuda] Ajuda ChatBubble - Jorge_Braz - 01.02.2012

Aqueles erro vc usa

pawn Код:
GetPlayerName(i, sendername, sizeof(sendername));
testa ae e me diz se funfou !


Re: [Ajuda] Ajuda ChatBubble - Jorge_Braz - 01.02.2012

E Pro seu aviso vocк usa
Coloca no inicio do seu GM
pawn Код:
forward Adminmsg();



Re: [Ajuda] Ajuda ChatBubble - JuniorPT - 01.02.2012

Faz isso que ele disse, o erro que й porque tu nгo tens o " sendername " defenido


Re: [Ajuda] Ajuda ChatBubble - Lуs - 01.02.2012

pawn Код:
public Adminmsg()
{
    for(new i = 0; i <= HighestID; i++)
    {
        if(IsPlayerConnected(i))
        {
            new sendername[MAX_PLAYER_NAME];
            GetPlayerName(i, sendername, MAX_PLAYER_NAME);
            if(AdminDuty[i] == 1 && PlayerInfo[i][pAdmin] > 0)
            {
                new string[128];
                format(string, 128, "Admin %s: Posso ajudar ?", sendername);
                SetPlayerChatBubble( i, string, COLOR_YELLOW, 50.0, 9000);
            }
            else if(AdminAfk[i] == 1 && PlayerInfo[i][pAdmin] > 0)
            {
                new string[128];
                format(string, 128, "Admin %s: Estou ausente.", sendername);
                SetPlayerChatBubble( i, string, COLOR_GREEN, 50.0, 9000);
            }
            else if(PlayerInfo[i][pDonateRank] == 1)
            {
                new string[128];
                format(string, 128, "%s: V.I.P 1", sendername);
                SetPlayerChatBubble( i, string, COLOR_GREEN, 50.0, 9000);
            }
            else if(PlayerInfo[i][pDonateRank] == 2)
            {
                new string[128];
                format(string, 128, "%s: V.I.P 2", sendername);
                SetPlayerChatBubble( i, string, COLOR_GREEN, 50.0, 9000);
            }
            else if(PlayerInfo[i][pDonateRank] == 3)
            {
                new string[128];
                format(string, 128, "%s: V.I.P 3", sendername);
                SetPlayerChatBubble( i, string, COLOR_GREEN, 50.0, 9000);
            }
        }
    }
    return 1;
}



Re: [Ajuda] Ajuda ChatBubble - yuryroque - 01.02.2012

Mais uma duvida, vai ficar o tempo todo?
Queria que os "ChatBubble" de VIP fique o tempo todo...



Re: [Ajuda] Ajuda ChatBubble - Lуs - 01.02.2012

Entгo crie 3DTextLabel... Ou entгo crie um por 24 horas:

pawn Код:
public Adminmsg()
{
    for(new i = 0; i <= HighestID; i++)
    {
        if(IsPlayerConnected(i))
        {
            new sendername[MAX_PLAYER_NAME];
            GetPlayerName(i, sendername, MAX_PLAYER_NAME);
            if(AdminDuty[i] == 1 && PlayerInfo[i][pAdmin] > 0)
            {
                new string[128];
                format(string, 128, "Admin %s: Posso ajudar ?", sendername);
                SetPlayerChatBubble( i, string, COLOR_YELLOW, 50.0, 1000*60*60*24);
            }
            else if(AdminAfk[i] == 1 && PlayerInfo[i][pAdmin] > 0)
            {
                new string[128];
                format(string, 128, "Admin %s: Estou ausente.", sendername);
                SetPlayerChatBubble( i, string, COLOR_GREEN, 50.0, 1000*60*60*24);
            }
            else if(PlayerInfo[i][pDonateRank] == 1)
            {
                new string[128];
                format(string, 128, "%s: V.I.P 1", sendername);
                SetPlayerChatBubble( i, string, COLOR_GREEN, 50.0, 1000*60*60*24);
            }
            else if(PlayerInfo[i][pDonateRank] == 2)
            {
                new string[128];
                format(string, 128, "%s: V.I.P 2", sendername);
                SetPlayerChatBubble( i, string, COLOR_GREEN, 50.0, 1000*60*60*24);
            }
            else if(PlayerInfo[i][pDonateRank] == 3)
            {
                new string[128];
                format(string, 128, "%s: V.I.P 3", sendername);
                SetPlayerChatBubble( i, string, COLOR_GREEN, 50.0, 1000*60*60*24);
            }
        }
    }
    return 1;
}



Re: [Ajuda] Ajuda ChatBubble - yuryroque - 01.02.2012

Quando sai do OnDuty e do AdminAFK os "ChatBubble" sai nй?


Re: [Ajuda] Ajuda ChatBubble - Lуs - 01.02.2012

Aн jб й com vocк. Por isso falei do 3D.

ChatBubble, nгo й ideal para isso.


Re: [Ajuda] Ajuda ChatBubble - yuryroque - 01.02.2012

Entгo como faz esse 3D no player?? =/