[Ajuda] Delet
#1

Reply
#2

A variбvel deve ser global, experimente criar essa array no topo do script. Sу toma cuidado pra nгo colocar um nome que jб exista, pois aн irб dar erro. =D
Reply
#3

Cara, vocк ta criando a variбvel em um comando, e querendo usar a mesma em outro ? ai fica difнcil mesmo nй, no caso vocк teria que criar uma variбvel global para poder usar em qualquer lugar.
Reply
#4

Nao testei Mais Tenta Ai:
Quote:

CMD:abripraga(playerid)
{
new Obj[2];// Mude o "2" De Acordo Com o Tanto De Objeto
Obj[0] = CreateDynamicObject(etc, etc, etc, etc);
Obj[1] = CreateDynamicObject(etc, etc, etc, etc);
return 1;
}


CMD:fecharpalco(playerid)
{
new Obj[2];// Mude o "2" De Acordo Com o Tanto De Objeto
for(new i; i < sizeof(Obj); i++)
{

DestroyDynamicObject(Obj[i]);
}
SendClientMessage(playerid, -1, "Deleta praga");
return 1;
}

Reply
#5

@Carlos001 Estб criando, porйm nгo deleta, sу da a msg.
Reply
#6

Quote:

CMD:fecharpalco(playerid)
{
new Obj[2];// Mude o "2" De Acordo Com o Tanto De Objeto
for(new i; i < sizeof(Obj); i++)
{

Obj[0] = DestroyDynamicObject(etc, etc, etc, etc);
Obj[1] = DestroyDynamicObject(etc, etc, etc, etc);
}
SendClientMessage(playerid, -1, "Deleta praga");
return 1;
}

Nгo Sei Se Vai Funcionar Assim Mais Tenta ai
Reply
#7

Quote:
Originally Posted by Stroon
Посмотреть сообщение
@Carlos001 Estб criando, porйm nгo deleta, sу da a msg.
De todas as sugestхes, vocк aceitou a ъnica incorreta. O vetor de objetos deve ser global.



PHP код:
new gObjects[6];
CMD:abripraga(playerid) {
    
gObjects[0] = CreateDynamicObject(...);
    
// ...
    
return 1;
}
CMD:fecharpalco(playerid) {
    for(new 
isizeof gObjects; ++i)
        
DestroyDynamicObject(gObjects[i]);
    
    return 
1;

Reply
#8

Muito Obrigado, Carlos001, zPain. + rep para ambos.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)