Cual es el problema (???)
#1

Sin palabras ! se me van a reir con esto pero, al entrar a un checkpointrace se me setea las cordenadas del siguiente a 0,0,0

PHP код:
new Float:MaratonCP[10][3] = {
    {-
690.4501, -834.8427101.8755},
    {-
645.7204, -765.917470.9295},
    {-
607.4532, -717.467955.8301},
    {-
554.5042, -716.192327.5240},
    {-
320.0933, -712.619553.3668},
    {-
296.5722, -708.7374, -0.3947},
    {-
252.0401, -682.5684, -0.3947},
    {-
115.9776, -886.7798, -0.3947},
    {
4.6160, -912.5621, -0.3947},
    {
99.5679, -911.53340.1937}
};
//Esto en EnterCheckPointRace
MCPProgress[playerid]++; // <- esto esta seteado a 0 en onplayerconnect y disconnect
        
if(MCPProgress[playerid] == 9SetPlayerRaceCheckpoint(playerid1MaratonCP[MCPProgress[playerid]][0], MaratonCP[MCPProgress[playerid]][1], MaratonCP[MCPProgress[playerid]][2], MaratonCP[MCPProgress[playerid]+1][0], MaratonCP[MCPProgress[playerid]+1][1], MaratonCP[MCPProgress[playerid]+1][2], CHECKCP_SIZE);
        else 
SetPlayerRaceCheckpoint(playerid0MaratonCP[MCPProgress[playerid]][0], MaratonCP[MCPProgress[playerid]][1], MaratonCP[MCPProgress[playerid]][2], MaratonCP[MCPProgress[playerid]+1][0], MaratonCP[MCPProgress[playerid]+1][1], MaratonCP[MCPProgress[playerid]+1][2], CHECKCP_SIZE);
// esto en la funcion que inicia los checkpoint y destraba el player
SetPlayerRaceCheckpoint(playerid0MaratonCP[MCPProgress[playerid]][0], MaratonCP[MCPProgress[playerid]][1], MaratonCP[MCPProgress[playerid]][2], MaratonCP[MCPProgress[playerid]+1][0], MaratonCP[MCPProgress[playerid]+1][1], MaratonCP[MCPProgress[playerid]+1][2], CHECKCP_SIZE); 
Reply
#2

pawn Код:
new Float:MaratonCP[11][3] = {
    {-690.4501, -834.8427, 101.8755},
    {-645.7204, -765.9174, 70.9295},
    {-607.4532, -717.4679, 55.8301},
    {-554.5042, -716.1923, 27.5240},
    {-320.0933, -712.6195, 53.3668},
    {-296.5722, -708.7374, -0.3947},
    {-252.0401, -682.5684, -0.3947},
    {-115.9776, -886.7798, -0.3947},
    {4.6160, -912.5621, -0.3947},
    {99.5679, -911.5334, 0.1937}
};
Tienes que sumarle un valor mбs de los que en realidad tiene.
Reply
#3

si lo hago me tira error !
Reply
#4

Quote:
Originally Posted by ForTrezZ
Посмотреть сообщение
si lo hago me tira error !
їTe tira error 52? Esperame que termine de estudiar y te ayudarй, agregame a skype, goncho281
Reply
#5

PHP код:

#include <a_samp>
#define CHECKCP_SIZE 12.5
new bool:ParticipoMaraton[MAX_PLAYERS];
new 
ProgresoMaraton[MAX_PLAYERS];
static const 
Float:MaratonCP[10][3] = 

    {-
690.4501, -834.8427101.8755}, 
    {-
645.7204, -765.917470.9295}, 
    {-
607.4532, -717.467955.8301}, 
    {-
554.5042, -716.192327.5240}, 
    {-
320.0933, -712.619553.3668}, 
    {-
296.5722, -708.7374, -0.3947}, 
    {-
252.0401, -682.5684, -0.3947}, 
    {-
115.9776, -886.7798, -0.3947}, 
    {
4.6160, -912.5621, -0.3947}, 
    {
99.5679, -911.53340.1937}
};
public 
OnPlayerEnterRaceCheckpoint(playerid)
{
    
// Comprobamos sн participa en el maraton.
    
if (ParticipoMaraton[playerid])
    {
        
// Sн participa sumamos progreso(+1).
        
ProgresoMaraton[playerid] = ProgresoMaraton[playerid] +1;
        
// Esto es para ahorrar espacio.
        
new slot ProgresoMaraton[playerid];
        
// Sн el checkpoint no es el ante-ъltimo; aсadimos un puesto de control normal(1).
        
if (ProgresoMaraton[playerid] <= 7)
            
SetPlayerRaceCheckpoint(playerid0MaratonCP[(slot)][0], MaratonCP[(slot)][1], MaratonCP[(slot)][2], MaratonCP[(slot)+1][0], MaratonCP[(slot)+1][1], MaratonCP[(slot)+1][2], CHECKCP_SIZE);
        
// Contrarнo a eso sн el checkpoint al que ingreso fue el ante-ъltimo; aсadimos un puesto de control tipo meta(0).
        
else if (ProgresoMaraton[playerid] == 8)
            
SetPlayerRaceCheckpoint(playerid1MaratonCP[(slot)][0], MaratonCP[(slot)][1], MaratonCP[(slot)][2], 00.0000.0000.00CHECKCP_SIZE);
        
// Sн el puesto de control al que ingreso fue el ъltimo, sucederб esto.
        
else if (ProgresoMaraton[playerid] == sizeof(MaratonCP)-1)
        {
            
// Termino el maraton.
        
}
    }
    return 
true;

Reply
#6

Quote:
Originally Posted by JuanStone
Посмотреть сообщение
PHP код:

#include <a_samp>
#define CHECKCP_SIZE 12.5
new bool:ParticipoMaraton[MAX_PLAYERS];
new 
ProgresoMaraton[MAX_PLAYERS];
static const 
Float:MaratonCP[10][3] = 

    {-
690.4501, -834.8427101.8755}, 
    {-
645.7204, -765.917470.9295}, 
    {-
607.4532, -717.467955.8301}, 
    {-
554.5042, -716.192327.5240}, 
    {-
320.0933, -712.619553.3668}, 
    {-
296.5722, -708.7374, -0.3947}, 
    {-
252.0401, -682.5684, -0.3947}, 
    {-
115.9776, -886.7798, -0.3947}, 
    {
4.6160, -912.5621, -0.3947}, 
    {
99.5679, -911.53340.1937}
};
public 
OnPlayerEnterRaceCheckpoint(playerid)
{
    
// Comprobamos sн participa en el maraton.
    
if (ParticipoMaraton[playerid])
    {
        
// Sн participa sumamos progreso(+1).
        
ProgresoMaraton[playerid] = ProgresoMaraton[playerid] +1;
        
// Esto es para ahorrar espacio.
        
new slot ProgresoMaraton[playerid];
        
// Sн el checkpoint no es el ante-ъltimo; aсadimos un puesto de control normal(1).
        
if (ProgresoMaraton[playerid] <= 7)
            
SetPlayerRaceCheckpoint(playerid0MaratonCP[(slot)][0], MaratonCP[(slot)][1], MaratonCP[(slot)][2], MaratonCP[(slot)+1][0], MaratonCP[(slot)+1][1], MaratonCP[(slot)+1][2], CHECKCP_SIZE);
        
// Contrarнo a eso sн el checkpoint al que ingreso fue el ante-ъltimo; aсadimos un puesto de control tipo meta(0).
        
else if (ProgresoMaraton[playerid] == 8)
            
SetPlayerRaceCheckpoint(playerid1MaratonCP[(slot)][0], MaratonCP[(slot)][1], MaratonCP[(slot)][2], 00.0000.0000.00CHECKCP_SIZE);
        
// Sн el puesto de control al que ingreso fue el ъltimo, sucederб esto.
        
else if (ProgresoMaraton[playerid] == sizeof(MaratonCP)-1)
        {
            
// Termino el maraton.
        
}
    }
    return 
true;

es exactamente lo que hice, solo que yo lo hice mas corto !
Reply
#7

Quote:
Originally Posted by ForTrezZ
Посмотреть сообщение
es exactamente lo que hice, solo que yo lo hice mas corto !
Por lo menos deci Gracias y aprende a agradecer a las personas que te intentaron ayudar.
estoy mas que seguro que usaste ese codigo que te dieron y decis que lo hiciste vos bobo
Reply
#8

Quote:
Originally Posted by Toolkit
Посмотреть сообщение
Por lo menos deci Gracias y aprende a agradecer a las personas que te intentaron ayudar.
estoy mas que seguro que usaste ese codigo que te dieron y decis que lo hiciste vos bobo
Podemos aclarar una cosa, le estoy comentando al chico/a que me ayudo que es el mismo cуdigo que yo poseo solo que el mio es mas corto y sin embargo me sigue fallando ! en ningъn momento le falte el respeto ni a el ni a ti, tengo los suficientes aсos haciendo esto para andar robando cуdigo ... ! si no vas a ayudar amablemente te pido que ignores este post... !
Reply
#9

Hola nachitoh :'v
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)