SA-MP Forums Archive
A little problem with checkpoints - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: A little problem with checkpoints (/showthread.php?tid=202698)



A little problem with checkpoints - Tee - 24.12.2010

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.


Re: A little problem with checkpoints - The_Gangstas - 24.12.2010

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);
}



Re: A little problem with checkpoints - Tee - 24.12.2010

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


Re: A little problem with checkpoints - The_Gangstas - 24.12.2010

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);
    }



Re: A little problem with checkpoints - Tee - 24.12.2010

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