[Ajuda] PROCURADO
#1

tenho um sistema no meu server que quando o player ta procurado em cima da cabeзa dele fica PROCURADO [3] 3 й um exemplo de estrela...
e tem tambem os player que й adm,vips e socios fica escrito em cima deles exemplo: *ADMINISTRADOR*
e quando algum deles fica procurado em vez de aparecer Procurado [3] fica: *ADMINISTRADOR* [P:3]
sу que esse *ADMINISTRADOR* [P:3] ele й todo de uma cor exemplo: *ADMINISTRADOR* [P:3] e eu queria que ele ficasse assim: *ADMINISTRADOR* [P:3]

eu queria que o [P:3] ficasse de outra cor sem ser a mesma cor do *ADMINISTRADOR*

Ajudem... Codigos:
PHP код:
public TextProcu()
{
new 
string[26], other[8];
    for(new 
0MAX_PLAYERSi++)
    {
        if(
PlayerInfo[i][pAdmin] > 1format(stringsizeof(string) ,"** Administrador **");
        else if(
PlayerInfo[i][pSocio] > 0format(stringsizeof(string) ,"** SOCIO **");
        else if(
PlayerInfo[i][pVIP] > 1format(stringsizeof(string) ,"** SUPER-VIP **");
        else if(
PlayerInfo[i][pVIP] > 0format(stringsizeof(string) ,"** MEMBRO VIP **");
        else 
//caso for player normal
        
{
            if(
GetPlayerWantedLevel(i) > 0)
            {
                
format(stringsizeof(string) ,"*PROCURADO*[%d]"GetPlayerWantedLevel(i));
                
SetPlayerChatBubble(istringCOLOR_RED20.010000);
                continue;
            }
        }
        
format(othersizeof(other) ," [P:%d]"GetPlayerWantedLevel(i));
        
SetPlayerChatBubble(istringCOLOR_RED20.010000);
        if(
GetPlayerWantedLevel(i) > 0strcat(stringother);
        
SetPlayerChatBubble(istringCOR_VAGOS20.010000);
    }

Reply
#2

So mudar a cor..

pawn Код:
public TextProcu()
{
new string[26], other[8];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(PlayerInfo[i][pAdmin] > 1) format(string, sizeof(string) ,"** Administrador **");
        else if(PlayerInfo[i][pSocio] > 0) format(string, sizeof(string) ,"** SOCIO **");
        else if(PlayerInfo[i][pVIP] > 1) format(string, sizeof(string) ,"** SUPER-VIP **");
        else if(PlayerInfo[i][pVIP] > 0) format(string, sizeof(string) ,"** MEMBRO VIP **");
        else //caso for player normal
        {
            if(GetPlayerWantedLevel(i) > 0)
            {
                format(string, sizeof(string) ,"*PROCURADO*[%d]", GetPlayerWantedLevel(i));
                SetPlayerChatBubble(i, string, COLOR_RED, 20.0, 10000);
                continue;
            }
        }
        format(other, sizeof(other) ,"{CORAQUI} [P:%d]", GetPlayerWantedLevel(i));
        SetPlayerChatBubble(i, string, COLOR_RED, 20.0, 10000);
        if(GetPlayerWantedLevel(i) > 0) strcat(string, other);

        SetPlayerChatBubble(i, string, COR_VAGOS, 20.0, 10000);

    }

}
No lugar do {CORAQUI} vocк coloca a cor.
Reply
#3

assim nao da ja tentei! ele buga fica aparecendo os codigos
Reply
#4

Ta antes de tudo nгo sei porque duas funзхes...
pawn Код:
format(other, sizeof(other) ," [P:%d]", GetPlayerWantedLevel(i));
SetPlayerChatBubble(i, string, COLOR_RED, 20.0, 10000);
if(GetPlayerWantedLevel(i) > 0) strcat(string, other);

SetPlayerChatBubble(i, string, COR_VAGOS, 20.0, 10000);
E segundo que й simples, basta adicionar a cor no format da string...deve estas inserindo errado, veja isto:
pawn Код:
format(other, sizeof(other) ," {E84F33}[P:%d]", GetPlayerWantedLevel(i));
if(GetPlayerWantedLevel(i) > 0) strcat(string, other);

SetPlayerChatBubble(i, string, COR_VAGOS, 20.0, 10000);
Reply
#5

PHP код:
format(othersizeof(other) ," {E84F33}[P:%d]"GetPlayerWantedLevel(i)); 
mano isso nao й string й other
vc que me passo esse codigo kkkk

string seria:
PHP код:
format(stringsizeof(string) ," {E84F33}[P:%d]"GetPlayerWantedLevel(i)); 
Mais ja consegui arrumar ja! Vlww
Reply
#6

Quote:
Originally Posted by igor97m
Посмотреть сообщение
PHP код:
format(othersizeof(other) ," {E84F33}[P:%d]"GetPlayerWantedLevel(i)); 
mano isso nao й string й other
vc que me passo esse codigo kkkk

string seria:
PHP код:
format(stringsizeof(string) ," {E84F33}[P:%d]"GetPlayerWantedLevel(i)); 
Mais ja consegui arrumar ja! Vlww
Que? Cara vocк estб trocando as bolas por completo!!

Se vocк ver, abaixo da condiзгo de GetPlayerWantedLevel, ele jб usa SetPlayerChatBubble, com o valor final de string, e nesta condiзгo, й inserido other na string cara, que tem a funзгo de colocar o level de procurado do player, ou seja, desta forma que estб fazendo, estб errada, na verdade nгo tem muita reaзгo, mas pode bugar em vista que estas a inserir a text acima do player, e logo abaixo, usar novamente a funзгo, sendo que a de baixo jб esta correta, a de cima nгo, pois a string nгo foi 100% formatada, ou seja, nгo tem o level de procurado do lado...o certo seria:
pawn Код:
format(other, sizeof(other) ," [P:%d]", GetPlayerWantedLevel(i));
if(GetPlayerWantedLevel(i) > 0) strcat(string, other);

SetPlayerChatBubble(i, string, COR_VAGOS, 20.0, 10000);
Ah e a cor vai sim na string Other pois a mesma й responsбvel pelo complemento do level de procurado...
Reply
#7

Quote:
Originally Posted by igor97m
Посмотреть сообщение
PHP код:
format(othersizeof(other) ," {E84F33}[P:%d]"GetPlayerWantedLevel(i)); 
mano isso nao й string й other
vc que me passo esse codigo kkkk

Mais ja consegui arrumar ja! Vlww
Nгo precisava criar outro tуpico, jб estava te ajudando naquele outro.
E sim, other й uma string. O Bruno nгo estб errado!

Eu te expliquei o erro no outro tуpico e agora o Bruno acaba de lhe explicar novamente.
Para resolver o seu "erro" bastava usar {cor}...
Reply
#8

vey ja falei assim nao da ele ta bugando... eu ja consegui arrumar aqui...
VLW
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)