ayuda ... arrays,index,SetObjectMaterial....
#1

Buenas a todos, necesito ayuda con lo siguiente...
pawn Код:
new
        indexTXD[50],
        ContarIndex
    ;

    // asigno el index para el SetObjectMaterial
    indexTXD[ContarIndex] = 15;
    ContarIndex++; //sumo un array

    // asigno el index para el SetObjectMaterial
    indexTXD[ContarIndex] = 46;
    ContarIndex++; //sumo un array

    // asigno el index para el SetObjectMaterial
    indexTXD[ContarIndex] = 2;
    ContarIndex++; //sumo un array

    // asigno el index para el SetObjectMaterial
    indexTXD[ContarIndex] = 6;
    ContarIndex++; //sumo un array
pawn Код:
for(new index=0; index < ContarIndex; index++)
    {
        for(new idx=0; idx < sizeof(indexTXD); idx++)
        {
            if( idx == indexTXD[index] )
            {
                printf( " SetObjectMaterial(objeto, %d, -1, \"none\", \"none\", -1); " , idx);
                /*
                    RESULTADO:
                        SetObjectMaterial(objeto, 15, -1, \"none\", \"none\", -1);
                        SetObjectMaterial(objeto, 46, -1, \"none\", \"none\", -1);
                        SetObjectMaterial(objeto, 2, -1, \"none\", \"none\", -1);
                        SetObjectMaterial(objeto, 6, -1, \"none\", \"none\", -1);
                */

            }
        }
    }
pawn Код:
/*
        hasta acб todo bien. pero  ...
         
        AHORA COMO HAGO PARA ASIGNARLE DE NUEVO A LOS INDEX DE LOS ARRAYS ANTERIORES?.
        y los objetos (la variable 'objeto') los tengo con arrays tambiйn.
    */
desde ya muchas gracias.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)