Help me out!
#1

Alright so i have this system which helps me create checkpoints without adding 1 line for each "CreateDynamicCP"

pawn Код:
enum checkCPinfo
{
    cpID,
    Float:x,
    Float:y,
    Float:z,
    Float:cpSize,
    Float:ViewDistance
}

//rest of the code

static const server_CreateCheckpoints[][checkCPinfo] =
{
        {1,2159.2742,943.1719,10.8203,1.0,100.0},//Ammunation 4Dragons Entrance
        {2,2539.4631,2084.0339,10.8203,1.0,100.0},//Ammunation Emerald Isle Entrance
        {3,2286.9143,2432.3669,10.8203,1.0,100.0},//LVPD Entrance
        {4,285.7855,-86.7201,1001.5229,1.0,100.0}//Ammunation 4Dragons Exit
        /*{5,2286.8674,2431.7437,10.8203,1.0,100.0},
        {6,238.7121,139.5305,1003.0234,1.0,100.0}*/

};

stock server_CreateAllCheckpoints()
{
        for(new i; i < sizeof(server_CreateCheckpoints); i++)
        {
                CreateDynamicCP(server_CreateCheckpoints[i][x],server_CreateCheckpoints[i][y],server_CreateCheckpoints[i][z],server_CreateCheckpoints[i][cpSize],-1,-1,-1,server_CreateCheckpoints[i][ViewDistance]);
        }
        return 1;
}


public OnPlayerEnterDynamicCP(playerid,checkpointid)
{
    for(new i=0; i < sizeof(server_CreateCheckpoints); i++) //
        {
                if(server_CreateCheckpoints[i][cpID] == 0)//Ammunation 4Dragons Entrance
                {
                        SetPlayerPos(playerid,286.4219,-82.7033,1001.5156);
                        SetPlayerFacingAngle(playerid,293.4572);
                        SetCameraBehindPlayer(playerid);
                        SetPlayerInterior(playerid,4);
                }
The problem is that when i enter a checkpoints,no matter which one, it does what it supposed to do on the last one.
As you noticed they are numbered. TO make it clear...When i enter checkpoint 1 or 2 it does what it was supposed to do when i was entering checkpoint 3.
Reply


Messages In This Thread
Help me out! - by [rG]Cold - 09.01.2013, 11:53
Re: Help me out! - by denNorske - 09.01.2013, 12:08
Re: Help me out! - by [rG]Cold - 09.01.2013, 12:14
Re: Help me out! - by Niko_boy - 09.01.2013, 12:27
Re: Help me out! - by [rG]Cold - 09.01.2013, 14:15

Forum Jump:


Users browsing this thread: 2 Guest(s)