forward TextProcu();
SetTimer("TextProcu", 1000, true);
public TextProcu() { for(new i=0; i<MAX_PLAYERS; i++) { new string[256]; if(GetPlayerWantedLevel(i) > 0) { format(string,256,"||-||PROCURADO||[%d]",GetPlayerWantedLevel(i)); SetPlayerChatBubble(i,string, COLOR_RED, 100.0, 1000); } } }
public TextProcu()
{
    for(new i=0;i<MAX_PLAYERS;i++)
    {
        new VarPro[30];
        if(GetPlayerWantedLevel(i) > 0)
        {
            format(VarPro,30,"|| PROCURADO || [ %d ]",GetPlayerWantedLevel(i));
            SetPlayerChatBubble(i,VarPro,Vermelho,100.0,1000);
        }
    }
}Â
Nгo hб nada de errado, pois tenho uma GM para estudos, e tem o mesmo sistema:
PHP Code:
|
public TextProcu() { new string[80]; for(new x=0; x < MAX_PLAYERS; x++) { if(GetPlayerWantedLevelEx(x) > 0) { format(string,80,"|| PROCURADO || [ %d ]",WantedPoints[x]); SetPlayerChatBubble(x,string, 0xFF0000AA, 40.0, 1000); } } }
//---------------------- Timers ----------------------- SetTimer("RandomServerNames",7000, 1); faztime = SetTimer("Fazenda", 600000, 1); SetTimer("CheckAFK",60000,true);// afk mode SetTimer("Velocimetro", 500, 1); SetTimer("SendMensagens",120000,1); SetTimer("SetPlayerUnjail", 1000, 1); SetTimer("OtherTimer", 1000, 1); SetTimer("CarCheck", 40000, 1); SetTimer("CustomPickups", 1000, 1); SetTimer("PiscarTD", 15000, 1); SetTimer("Spectator", 2000, 1); SetTimer("Production", 300000, 1); SetTimer("CheckGas", 15000, 1); SetTimer("reloginho",1000,1); SetTimer("OnplayerAtualizador",1000,1); SetTimer("UpdateDrogas", tempodrogas*70000, 1); SetTimer("AllCheater", 1000, true); SetTimer("CriarIncendio", 20000*25, 0); SetTimer("AtualizarRank", 40000*20, 1); SetTimer("TextProcu", 1000, true); //-----------------------------------------------------------
Nгo hб erro algum no cуdigo, tenha em mente que vocк nгo pode ver o CharBubble que estб em vocк.
|
CMD:titulos(playerid) { new string[128]; new text[13][7]; MEGAString[0]=EOS; for(new i = 0; i < MAX_TITULOS; i++) { if(Titulos[playerid][i] > 0) { strmid(text[i], "FFFF00", 0, strlen("FFFF00"), 7); } if(Titulos[playerid][i] == 0) { strmid(text[i], "FFFFFF", 0, strlen("FFFFFF"), 7); } } strcat(MEGAString, "Titulo\tRequisitos\n"); format(string, sizeof string, "{%s}(Scripter)\tRequisitos: Level 5000 de Admin\n",text[0]); strcat(MEGAString, string); format(string, sizeof string, "{%s}(Mapper)\tRequisitos: Level 3001+ de Admin\n",text[1]); strcat(MEGAString, string); format(string, sizeof string, "{%s}(Cargo admin)\tRequisitos: Level 1+ de Admin\n",text[2]); strcat(MEGAString, string); format(string, sizeof string, "{%s}(Familia da Org)\tRequisitos: Ser de Alguma Organizaзгo\n",text[3]); strcat(MEGAString, string); format(string, sizeof string, "{%s}(Matador)\tMatar Mais de 100 players\n",text[4]); strcat(MEGAString, string); format(string, sizeof string, "{%s}(Noob)\tNenhum\n",text[5]); strcat(MEGAString, string); format(string, sizeof string, "{%s}(Experiente)\tLevel 30+\n",text[6]); strcat(MEGAString, string); format(string, sizeof string, "{%s}(VIP)\tSer VIP\n",text[7]); strcat(MEGAString, string); format(string, sizeof string, "{%s}(SUPER VIP)\tSer Super VIP\n",text[8]); strcat(MEGAString, string); format(string, sizeof string, "{%s}(Socio)\tSer socio\n",text[9]); strcat(MEGAString, string); format(string, sizeof string, "{%s}(Lнder)\tSer Lнder\n",text[10]); strcat(MEGAString, string); format(string, sizeof string, "{%s}(Novato)\tLvl 2+\n",text[11]); strcat(MEGAString, string); format(string, sizeof string, "{%s}(Helper)\tSer Helper\n",text[12]); strcat(MEGAString, string); ShowPlayerDialog(playerid, menutitulo, 5, "Tнtulos",MEGAString,"Selecionar", "Sair"); return 1; }
Entгo usa 3DTextLabel ao invйs de ChatBubble, vocк pode definir a posiзгo que ficarб no player, sem dar conflito com o chatbubble.
Create3DTextLabel Attach3DTextLabelToPlayer Update3DTextLabelText |
sabe se posso achar na net ? |
Pare de querer coisas prontas e corra atrбs vocк mesmo.
Links ÑŠteis. https://sampwiki.blast.hk/wiki/Create3DTextLabel https://sampwiki.blast.hk/wiki/Attach3DTextLabelToPlayer https://sampwiki.blast.hk/wiki/Update3DTextLabelText |
new Text3D:TextProcu[MAX_PLAYERS]; public TextProcu() { for(new i = 0; i <= GetPlayerPoolSize(); i++) { new string[256]; if(GetPlayerWantedLevel(i) > 0) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); format(string,256,"||-||PROCURADO||[%d]",GetPlayerWantedLevel(i)); TextProcu[playerid] = CreatePlayer3DTextLabel(playerid, string, COLOR_RED, x, y, z+1.0, 40.0, GetPlayerVirtualWorld(playerid), 1); UpdatePlayer3DTextLabelText(playerid, TextProcu[playerid], COLOR_RED, string); } else if(GetPlayerWantedLevel(i) == 0) { Delete3DTextLabel(TextProcu[playerid]); } } }
//News
new Text3D:LabelProc[MAX_PLAYERS];
//SetTimer
SetTimer("AtualizarTextLabel", 100, true);
//Public
forward AtualizarTextLabel(playerid);
public AtualizarTextLabel(playerid)
{
    if(GetPlayerWantedLevel(playerid) == 0)
    {
        Delete3DTextLabel(LabelProc[playerid]);
    }
    if(GetPlayerWantedLevel(playerid) == 1)
    {
        Delete3DTextLabel(LabelProc[playerid]);
        LabelProc[playerid] = Create3DTextLabel("Procurado Nнvel: 1", 0xFF0000AA, 30.0, 40.0, 50.0, 100.0, 0);
        Attach3DTextLabelToPlayer(LabelProc[playerid], playerid, 0.0, 0.0, 0.3);
    }
    if(GetPlayerWantedLevel(playerid) == 2)
    {
        Delete3DTextLabel(LabelProc[playerid]);
        LabelProc[playerid] = Create3DTextLabel("Procurado Nнvel: 2", 0xFF0000AA, 30.0, 40.0, 50.0, 100.0, 0);
        Attach3DTextLabelToPlayer(LabelProc[playerid], playerid, 0.0, 0.0, 0.3);
    }
    if(GetPlayerWantedLevel(playerid) == 3)
    {
        Delete3DTextLabel(LabelProc[playerid]);
        LabelProc[playerid] = Create3DTextLabel("Procurado Nнvel: 3", 0xFF0000AA, 30.0, 40.0, 50.0, 100.0, 0);
        Attach3DTextLabelToPlayer(LabelProc[playerid], playerid, 0.0, 0.0, 0.3);
    }
    if(GetPlayerWantedLevel(playerid) == 4)
    {
        Delete3DTextLabel(LabelProc[playerid]);
        LabelProc[playerid] = Create3DTextLabel("Procurado Nнvel: 4", 0xFF0000AA, 30.0, 40.0, 50.0, 100.0, 0);
        Attach3DTextLabelToPlayer(LabelProc[playerid], playerid, 0.0, 0.0, 0.3);
    }
    if(GetPlayerWantedLevel(playerid) == 5)
    {
        Delete3DTextLabel(LabelProc[playerid]);
        LabelProc[playerid] = Create3DTextLabel("Procurado Nнvel: 5", 0xFF0000AA, 30.0, 40.0, 50.0, 100.0, 0);
        Attach3DTextLabelToPlayer(LabelProc[playerid], playerid, 0.0, 0.0, 0.3);
    }
    if(GetPlayerWantedLevel(playerid) == 6)
    {
        Delete3DTextLabel(LabelProc[playerid]);
        LabelProc[playerid] = Create3DTextLabel("Procurado Nнvel: 6", 0xFF0000AA, 30.0, 40.0, 50.0, 100.0, 0);
        Attach3DTextLabelToPlayer(LabelProc[playerid], playerid, 0.0, 0.0, 0.3);
    }
    return 1;
}Â
PHP Code:
- Copilado com sucesso - AutoMatic |
SetTimerEx("Atualizar",1000,true,"i",playerid); //Coloque em OnPlayerConnect
forward Atualizar(playerid); //Coloque no topo do gamemode
public Atualizar(playerid) //Coloque abaixo da forward
{Â
    new Str[50];
    if(GetPlayerWantedLevel(playerid) > 0)Â
    {
        format(Str,sizeof(Str),"Procurado Nнvel: %d",GetPlayerWantedLevel(playerid));
        SetPlayerChatBubble(playerid,Str, 0x86DD63FF, 100.0, 10000);
    }
    return 1;Â
}Â
new Text3D:Label[MAX_PLAYERS];Â
SetTimerEx("Atualizar",1000,true,"i",playerid);Â
forward Atualizar(playerid);Â
public Atualizar(playerid)Â
{Â
    new Str[50];
    if(GetPlayerWantedLevel(playerid) > 0)Â
    {Â
        Delete3DTextLabel(LabelProc[playerid]);Â
        format(Str,sizeof(Str),"Procurado Nнvel: %d",GetPlayerWantedLevel(playerid));
        Label[playerid] = Create3DTextLabel(Str, 0xFF0000AA, 30.0, 40.0, 50.0, 100.0, 0);Â
        Attach3DTextLabelToPlayer(Label[playerid], playerid, 0.0, 0.0, 0.3);Â
    }Â
    return 1;Â
}Â
//OnGameModeInit
SetTimer("AtualizarChatBubble", 1000, true);Â
//Public
forward AtualizarChatBubble();
public AtualizarChatBubble()
{
    for(new x = 0; x < MAX_PLAYERS; x++)
    {
        if(GetPlayerWantedLevel(x) == 1)
        {
            SetPlayerChatBubble(x, "Procurado(a) Nнvel: 1", 0xFF0000AA, 100.0, 100000);
        }
        if(GetPlayerWantedLevel(x) == 2)
        {
            SetPlayerChatBubble(x, "Procurado(a) Nнvel: 2", 0xFF0000AA, 100.0, 100000);
        }
        if(GetPlayerWantedLevel(x) == 3)
        {
            SetPlayerChatBubble(x, "Procurado(a) Nнvel: 3", 0xFF0000AA, 100.0, 100000);
        }
        if(GetPlayerWantedLevel(x) == 4)
        {
            SetPlayerChatBubble(x, "Procurado(a) Nнvel: 4", 0xFF0000AA, 100.0, 100000);
        }
        if(GetPlayerWantedLevel(x) == 5)
        {
            SetPlayerChatBubble(x, "Procurado(a) Nнvel: 5", 0xFF0000AA, 100.0, 100000);
        }
        if(GetPlayerWantedLevel(x) == 6)
        {
            SetPlayerChatBubble(x, "Procurado(a) Nнvel: 6", 0xFF0000AA, 100.0, 100000);
        }
    }
}Â
Tente desta maneira:
PHP Code:
PHP Code:
|