[Ajuda] Dъvida sobre Matrizes - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Dъvida sobre Matrizes (
/showthread.php?tid=424600)
Dъvida sobre Matrizes -
n0minal - 23.03.2013
Minha pergunta й: Matrizes sу funcionam com variбveis? Elas podem funcionar tambйm com forwards?
Ex: Ao invйs de:
forward GateClose1();
forward GateClose2();
forward GateClose3();
forward GateClose4();
forward GateClose5();
forward GateClose6();
forward GateClose7();
forward GateClose8();
Eu poderia colocar
forward GateClose[9]();







?
Re: Dъvida sobre Matrizes -
lucas_mdr1235 - 23.03.2013
VARIAVEIS e STRINS com matrizes nao
Re: Dъvida sobre Matrizes - Joao Pedro - 23.03.2013
Nгo muda nada. O GateClose serб tratado como uma variбvel, entгo alйm de usar ele, vocк teria que dar um valor para o mesmo.
Re: Dъvida sobre Matrizes -
n0minal - 23.03.2013
Ah tudo bem, deixa assim mesmo entгo...
Re: Dъvida sobre Matrizes -
leonardo1434 - 23.03.2013
Quote:
Originally Posted by n0minal
Minha pergunta й: Matrizes sу funcionam com variбveis? Elas podem funcionar tambйm com forwards?
Ex: Ao invйs de:
forward GateClose1();
forward GateClose2();
forward GateClose3();
forward GateClose4();
forward GateClose5();
forward GateClose6();
forward GateClose7();
forward GateClose8();
Eu poderia colocar
forward GateClose[9]();
       ?
|
not possible.
forwards sгo compile time e nгo run time, eu acho que atй da pra fazer um macro recursivo mas nem vale a pena.
Re: Dъvida sobre Matrizes -
paulor - 23.03.2013
Pense mais cara, faзa assim:
pawn Код:
//Declarar
forward GateClose(gateid, Float:x, Float:y, Float:z, Float:speed);
public GateClose(gateid, Float:x, Float:y, Float:z, Float:speed) MoveDynamicObject(gateid, x, y, z, speed);
//Usar
GateClose(Gate, 0.0, 0.0, 0.0, 0.0);
Uma ъnica que funciona para todas.. Simples assim!!
Respuesta: Dъvida sobre Matrizes -
[JD]BlackFire - 23.03.2013
pawn Код:
forward GateClose(gateid);
public GateClose(gateid){
if(gateid == id){
}
}
Re: Respuesta: Dъvida sobre Matrizes -
zSuYaNw - 23.03.2013
Quote:
Originally Posted by [JD]BlackFire
pawn Код:
forward GateClose(gateid); public GateClose(gateid){ if(gateid == id){ } }
|
Esta sim й a melhor forma.
Re: Dъvida sobre Matrizes -
n0minal - 23.03.2013
A public jб tб feita, sу queria tirar essa dъvida sobre os forwards mas jб tб organizado, obrigado a todos.