Uma sу linha -
junioor - 11.07.2013
Boa Tarde, gostaria de saber se й possнvel eu deixar esses codigos em somente uma linha.
pawn Код:
TextDrawShowForPlayer(playerid, topblack);
TextDrawShowForPlayer(playerid, bottomblack);
Tipo assim..
pawn Код:
TextDrawShowForPlayer(playerid, topblack & bottomblack);
Alguйm me ajuda?
Re: Uma sу linha -
WLSF - 11.07.2013
pawn Код:
TextDrawShowForPlayer(playerid, topblack); TextDrawShowForPlayer(playerid, bottomblack);
Do jeito que vocк fez tб alterando o ID do text, nгo vai funcionar.
Em uma linha pode ser assim como mostrei, ou pode usar um define, mas й besteira.
Linhas nгo vгo te prejudicar tanto assim, nгo tenha medo delas.
Abraзos.
Re: Uma sу linha -
BielCOP - 11.07.2013
pawn Код:
TextDrawShowForPlayer(playerid, topblack); TextDrawShowForPlayer(playerid, bottomblack);
-.-
Re: Uma sу linha -
junioor - 11.07.2013
Й por que o meu GM tem muita coisa ai as vezes eu comeзo a me embolar nas linhas e queria deixar organizado como no exemplo que eu dei, nгo teria como ?
Re: Uma sу linha -
BielCOP - 11.07.2013
junioor
Big Clucker
Join Date: Jul 2010
Posts: 164
Reputation: 0
Tu fez a sua conta praticamente com o IpsBruno e sу tem 164 posts ? O.o
Re: Uma sу linha -
WLSF - 11.07.2013
Eu expliquei, leia ali.
Com o seu exemplo vai acabar alterando o ID pra um text inexistente, nгo funciona...
Tб incrementando ids
й como se fosse id 2, id 1
Код:
2 & 1 = 10 & 01 = 00
Re: Uma sу linha -
junioor - 11.07.2013
Sim Biel, Por que na epoca eu tirava minhas dъvidas com ele por skype ou msn, ai eu nгo utilizava o forum.
Muito obrigado a vocкs dois..!
Re: Uma sу linha -
darkxdll - 11.07.2013
Olha acho que assim ficaria legal para mostrar 2 textdraw :
PHP код:
stock ShowTwoTextDrawForPlayer(playerid,Text:tdw1,Text:tdw2)
{
TextDrawShowForPlayer(playerid, tdw1);
TextDrawShowForPlayer(playerid, tdw2);
return 1;
}
Obs : nгo testei , se funcionar comente aqui 
Modo de uso :
PHP код:
ShowTwoTextDrawForPlayer(playerid, Id_Da_Text_Aqui, Id_Da_Segunda_Text_Aqui);
Re: Uma sу linha -
BielCOP - 11.07.2013
Quote:
Originally Posted by darkxdll
Olha acho que assim ficaria legal para mostrar 2 textdraw :
PHP код:
stock ShowTwoTextDrawForPlayer(playerid,Text:tdw1,Text:tdw2)
{
TextDrawShowForPlayer(playerid, tdw1);
TextDrawShowForPlayer(playerid, tdw2);
return 1;
}
Obs : nгo testei , se funcionar comente aqui 
Modo de uso :
PHP код:
ShowTwoTextDrawForPlayer(playerid, Id_Da_Text_Aqui, Id_Da_Segunda_Text_Aqui);
|
Pra que usar return em uma Stock ? '-'
Re: Uma sу linha -
WLSF - 11.07.2013
Quote:
Originally Posted by darkxdll
Olha acho que assim ficaria legal para mostrar 2 textdraw :
PHP код:
stock ShowTwoTextDrawForPlayer(playerid,Text:tdw1,Text:tdw2)
{
TextDrawShowForPlayer(playerid, tdw1);
TextDrawShowForPlayer(playerid, tdw2);
return 1;
}
Obs : nгo testei , se funcionar comente aqui 
Modo de uso :
PHP код:
ShowTwoTextDrawForPlayer(playerid, Id_Da_Text_Aqui, Id_Da_Segunda_Text_Aqui);
|
Bom jб que vocк deu a dica, fiz algo legal aqui:
pawn Код:
stock ShowDraws(playerid, Text:...)
{
new sValue = numargs();
while (sValue--)
{
TextDrawShowForPlayer(playerid, Text:getarg(sValue));
}
return 1;
}
Forma de uso:
pawn Код:
ShowDraws(playerid, t[0], t[1], t[2]); // Se quiser adicionar mais textdraws, sу por a vнrgula e continuar inserindo o nome.