A little problem with checkpoints
#1

In my car dealer i created checkpoints where you can sell your vehicle:

pawn Код:
for(new i = 0; i < sizeof(DealerCP); i++)
    {
        DealerPos = CreateDynamicCP(DealerCP[i][0],DealerCP[i][1],DealerCP[i][2],1.0,-1,-1,-1,100.0);
    }
But it is kinda of its own mind, i have 3 checkpoints but the dialog only shows in one of those 3 not all of them.

pawn Код:
if(checkpointid == DealerPos)
    {
        for(new x = 0; x < sizeof(DealerCP); x++)
        if(IsPlayerInRangeOfPoint(playerid, 10.0, DealerCP[x][0], DealerCP[x][1], DealerCP[x][2]))
        ShowPlayerSellVehDialog(playerid);
    }
What can i do to fix it. Sorry for indentation thats not how it looks.
Reply
#2

pawn Код:
DealerPos[i] = CreateDynamicCP(DealerCP[i][0],DealerCP[i][1],DealerCP[i][2],1.0,-1,-1,-1,100.0);

for(new x = 0; x < sizeof(DealerCP); x++)
if(checkpointid == DealerPos[x])
{
        for(new x = 0; x < sizeof(DealerCP); x++)
        if(IsPlayerInRangeOfPoint(playerid, 10.0, DealerCP[x][0], DealerCP[x][1], DealerCP[x][2]))
        ShowPlayerSellVehDialog(playerid);
}
Reply
#3

OK i will test it but how does that work? Be cause i create the checkpoint OnGameModeInit.
Reply
#4

omg dude seriously?

pawn Код:
for(new i = 0; i < sizeof(DealerCP); i++)
    {
        DealerPos[i] = CreateDynamicCP(DealerCP[i][0],DealerCP[i][1],DealerCP[i][2],1.0,-1,-1,-1,100.0);
    }
Reply
#5

Oh but i used the aBank concept. But thanks anyway and Merry Christmas
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)