[Ajuda] TextDraw no /ann e /cnn
#1

Galera, esse й o meu /cnn e meu /ann, eu gostaria de mudar a fonte deles, colocar a fonte 1 mas eu nгo sei como fazer isso, sei que й coisa simples, e gostaria de uma ajudinha.

Код:
if(strcmp(cmd, "/cnn", true) == 0)
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), P_CONTAS, aname);
if(pAdmin[playerid] == 1 || pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5){
new tmp[256];
tmp = strtok(cmdtext, idx, strlen(cmdtext));
if (!strlen(tmp))
{
SendClientMessage(playerid, Vermelho, "{0099FF}{0099FF}|INFO|{CCCCFF}{CCCCFF} Digite: /cnn [texto]");
return 1;
}
if(PlayerInfo[playerid][Logged] == 1)
{
if(pAdmin[playerid] == 1 || pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5)
{
format(string, sizeof(string), "# ~b~%s~b~: ~r~%s~r~ #", aname, tmp);
GameTextForAll(string, 4000, 3);
}else{
SendClientMessage(playerid, Vermelho, "{0099FF}{0099FF}|INFO|{CCCCFF}{CCCCFF} Comando inexistente.");
}
}else{
SendClientMessage(playerid, Vermelho, "{0099FF}{0099FF}|INFO|{CCCCFF}{CCCCFF} Comando inexistente.");
}
return 1;
}
}

// /ann agora

if(strcmp(cmd, "/ann", true) == 0)
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), P_CONTAS, aname);
if(pAdmin[playerid] == 1 || pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5){
new tmp[256];
tmp = strtok(cmdtext, idx, strlen(cmdtext));
if (!strlen(tmp))
{
SendClientMessage(playerid, Vermelho, "{0099FF}{0099FF}|INFO|{CCCCFF}{CCCCFF} Digite: /ann [texto]");
return 1;
}
if(PlayerInfo[playerid][Logged] == 1)
{
if(pAdmin[playerid] == 1 || pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5){
format(string, sizeof(string), "# ~w~[] %s [] #", tmp);
GameTextForAll(string, 5000, 3);
}else{
SendClientMessage(playerid, Vermelho, "{0099FF}{0099FF}|INFO|{CCCCFF}{CCCCFF} Comando inexistente.");
}
}else{
SendClientMessage(playerid, Vermelho, "{0099FF}{0099FF}|INFO|{CCCCFF}{CCCCFF} Comando inexistente.");
}
return 1;
}
}
Reply
#2

Troca ali a font dos dois no GameTextForAll no final por um, ficando assim:

GameTextForAll(string, 5000, 1);

flw
Reply
#3

Quote:
Originally Posted by Mteck
Посмотреть сообщение
Troca ali a font dos dois no GameTextForAll no final por um, ficando assim:

GameTextForAll(string, 5000, 1);

flw
Se eu mudar essa value de "3" para "1" ira mudar a posiзгo da mensagem.
Reply
#4

Eu nгo entendo muito disso , entгo nгo tem nada a ver .

Mas onde tu tem : "pAdmin[playerid] == 1 || pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5"

nгo era melhor "pAdmin[playerid] >= 1&&pAdmin[playerid]<=5"

Isso iria verificar se ficava entre 1 e 5 evitando meter os OU todos ,. acho eu que fica mais simples .
Reply
#5

pawn Код:
format(string, sizeof(string), "# ~b~%s~b~: ~r~%s~r~ #", aname, tmp);

essa e a linha pra vc mudar as cores ( acho que deve ser isso que vc quer )

o que esta a ~~ (exemplo ~b~) e o azul, e porque 'b'? porque e a inicial de azul em ingles ( blue )

aqui tens a lista das cores: https://sampwiki.blast.hk/wiki/Colors_List

ja se for a posicao, veja aqui: https://sampwiki.blast.hk/wiki/GameTextStyle
Reply
#6

Quote:
Originally Posted by PT
Посмотреть сообщение
pawn Код:
format(string, sizeof(string), "# ~b~%s~b~: ~r~%s~r~ #", aname, tmp);

essa e a linha pra vc mudar as cores ( acho que deve ser isso que vc quer )

o que esta a ~~ (exemplo ~b~) e o azul, e porque 'b'? porque e a inicial de azul em ingles ( blue )

aqui tens a lista das cores: https://sampwiki.blast.hk/wiki/Colors_List

ja se for a posicao, veja aqui: https://sampwiki.blast.hk/wiki/GameTextStyle
Nгo quero as cores, eu quero mudar a fonte :/
Reply
#7

olha que eu falei.......


olha este link: https://sampwiki.blast.hk/wiki/GameTextStyle

vc leu?
Reply
#8

Troque o seu
Quote:

if(pAdmin[playerid] == 1 || pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5){

Por
Quote:

if(pAdmin[playerid] > 0)

Que server para todos adm's
Reply
#9

E no
Quote:

GameTextForAll(string, 5000, 3);

Eu acho que vocк sу pode colocar o 2, 3, 4, 5 ou 6, por que o 1 fica la em baixo.






--

Espero ter ajudado.

Atenciosamente
Macacu Vuador
Skype: luis.paulo.2
Reply
#10

Quote:
Originally Posted by MacacuVuador
Посмотреть сообщение
E no

Eu acho que vocк sу pode colocar o 2, 3, 4, 5 ou 6, por que o 1 fica la em baixo.






--

Espero ter ajudado.

Atenciosamente
Macacu Vuador
Skype: luis.paulo.2
Boa, era isso mesmo. Mas, eu jб vн outros servidores com um estilo de fonte diferente, como eles colocaram? achei super legal.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)