[Ajuda] Dъvida sobre Matrizes
#1

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]();

?
Reply
#2

VARIAVEIS e STRINS com matrizes nao
Reply
#3

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.
Reply
#4

Ah tudo bem, deixa assim mesmo entгo...
Reply
#5

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.
Reply
#6

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!!
Reply
#7

pawn Код:
forward GateClose(gateid);
public GateClose(gateid){
    if(gateid == id){
    }
}
Reply
#8

Quote:
Originally Posted by [JD]BlackFire
Посмотреть сообщение
pawn Код:
forward GateClose(gateid);
public GateClose(gateid){
    if(gateid == id){
    }
}
Esta sim й a melhor forma.
Reply
#9

A public jб tб feita, sу queria tirar essa dъvida sobre os forwards mas jб tб organizado, obrigado a todos.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)