[Duda] Como hacer esto.
#8

El cуdigo lo tengo asн:

pawn Код:
new NumeroObtenido[MAXIMO_NEGOCIOS] = 0;
            new negocios_tipo_1;

            for (new i = 0; i < MAXIMO_NEGOCIOS; i ++) if (NegociosInfo[i][bizExists])
            {
                NumeroObtenido[i] = -1;
                if (NegociosInfo[i][bizType] == 1)
                {
                    NumeroObtenido[negocios_tipo_1] = i;
                    negocios_tipo_1 ++;
                }
            }

            for (new i = 0; i < MAXIMO_NEGOCIOS; i ++) if (NegociosInfo[i][bizExists])
            {
                if(NumeroObtenido[i] != -1)
                {
                    printf("%d", NumeroObtenido[i]);
                }
            }
            new Valor2 =        random(negocios_tipo_1);
            MensajeDebug(Jugador, "Valor2 - %d", Valor2);
            printf("Valor2 %d", Valor2);
            DisablePlayerCheckpoint(Jugador);
            SetPlayerCheckpoint(Jugador, NegociosInfo[Valor2][bizDeliver][0], NegociosInfo[Valor2][bizDeliver][1], NegociosInfo[Valor2][bizDeliver][2], 3.0);
            SendInfoMensaje(Jugador, " El negocio fue marcado en tu gps.");
            EnDestinoCamionero[Jugador] = true;
Segъn la consola marca esto:

Код:
[01:54:45] 2
[01:54:45] 5
[01:54:45] 13
[01:54:45] 18
[01:54:45] 22
[01:54:45] 25
[01:54:45] 26
[01:54:45] 27
[01:54:45] 36
[01:54:45] 37
[01:54:45] Valor2 7
El random busca el negocio 7 pero como podrбs ver, dicho negocio no tiene el tipo 1 y por eso no aparece en la consola.
Reply


Messages In This Thread
[Duda] Como hacer esto. - by Tirael - 04.07.2017, 16:02
Respuesta: [Duda] Como hacer esto. - by adri1 - 04.07.2017, 16:30
Respuesta: [Duda] Como hacer esto. - by Whyd - 04.07.2017, 16:42
Respuesta: [Duda] Como hacer esto. - by Tirael - 04.07.2017, 18:41
Respuesta: [Duda] Como hacer esto. - by adri1 - 04.07.2017, 19:01
Respuesta: [Duda] Como hacer esto. - by Tirael - 04.07.2017, 20:59
Respuesta: [Duda] Como hacer esto. - by adri1 - 04.07.2017, 21:56
Respuesta: [Duda] Como hacer esto. - by Tirael - 05.07.2017, 00:10
Respuesta: [Duda] Como hacer esto. - by adri1 - 05.07.2017, 00:18
Respuesta: [Duda] Como hacer esto. - by Tirael - 05.07.2017, 00:28

Forum Jump:


Users browsing this thread: 1 Guest(s)