Text draw com comando -
RodrigoBsC - 24.04.2014
Como faz um comando que se vocк digitar ex: /anunciar (texto) ai aparece como se fosse o GameTextForPlayer, sу que em letra menor, alguйm poderia me ajudar?
to em dъvida sobre isso e queria ajuda, й tipo /ao pra server truck so que com letras menores do que as do GameTextForPlayer.. usei o search e nгo achei nada parecido ou sobre isso...
Obrigado desde jб agradeзo!
Re: Text draw com comando -
lKoDlFuLLaNNo - 24.04.2014
variavel topo do gm/FS
pawn Код:
new Text:CNN[MAX_PLAYERS];
forward da public para nao dar warnings
pawn Код:
forward ApagarTexto(playerid);
GameModeInit()
pawn Код:
for(new i=0; i<GetMaxPlayers(); i++)
{
CNN[i] = TextDrawCreate(35.000000, 152.000000, " ");
TextDrawBackgroundColor(CNN[i], 255);
TextDrawFont(CNN[i], 1);
TextDrawLetterSize(CNN[i], 0.310000, 1.000000);
TextDrawColor(CNN[i], -1);
TextDrawSetOutline(CNN[i], 1);
TextDrawSetProportional(CNN[i], 1);
}
Comando // OnPlayerCommandText
pawn Код:
if(strcmp(cmd, "/cnn", true) == 0)
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
strmid(tmp, cmdtext, 4, strlen(cmdtext));
if(!strlen(tmp))
{
SendClientMessage(playerid, Vermelho, " | ERRO | Use /cnn [Texto] .");
return 1;
}
for(new i=0; i<MAX_PLAYERS; i++)
{
format(string, sizeof(string), "~g~~h~%s ~p~ (%d): ~w~%s",aname, i,tmp);
TextDrawSetString(CNN[i], string);
TextDrawShowForPlayer(i, CNN[i]);
SetTimerEx("ApagarTexto",5000,false,"i",i);
}
return 1;
}
Final do gm //
pawn Код:
public ApagarTexto()
{
foreach(Player,i)
{
TextDrawHideForPlayer(i, CNN[i]);
}
return 1;
}
Codigos de
yNexus
Re: Text draw com comando -
RodrigoBsC - 24.04.2014
vlw deu certinho...
Re: Text draw com comando -
LeleziiN - 17.07.2015
Deu erro aqui mano
Re: Text draw com comando -
iTakelot - 17.07.2015
Quote:
Originally Posted by LeleziiN
Deu erro aqui mano
|
Quais erros que deu ae? so da erro no seu amigo muito estranho.