25.12.2015, 02:25
The bug is, after I reach the first checkpoint, the second checkpoint disappears when I come close enough to it...
(I've got this somewhere)
(I've got this somewhere)
PHP код:
cp_dt[playerid][0] = 1;
PHP код:
new cp_dt[MAX_PLAYERS][12];
public OnPlayerEnterCheckpoint(playerid)
{
if(cp_dt[playerid][0] == 1)
{
DisablePlayerCheckpoint(playerid);
cp_dt[playerid][0] = 0;
cp_dt[playerid][1] = 1;
SetPlayerCheckpoint(playerid, -814.7975,2729.9858,45.2125, 10);
return 1;
}
if(cp_dt[playerid][1] == 1)
{
DisablePlayerCheckpoint(playerid);
cp_dt[playerid][1] = 0;
cp_dt[playerid][2] = 1;
SetPlayerCheckpoint(playerid, -1495.9296,2731.0828,65.4049, 10);
return 1;
}
if(cp_dt[playerid][2] == 1)
{
DisablePlayerCheckpoint(playerid);
cp_dt[playerid][2] = 0;
cp_dt[playerid][3] = 1;
SetPlayerCheckpoint(playerid, -1745.5870,2218.0757,2.7297, 10);
return 1;
}
if(cp_dt[playerid][3] == 1)
{
DisablePlayerCheckpoint(playerid);
cp_dt[playerid][3] = 0;
cp_dt[playerid][4] = 1;
SetPlayerCheckpoint(playerid, -1616.9918,1833.8109,25.5708, 10);
return 1;
}
if(cp_dt[playerid][4] == 1)
{
DisablePlayerCheckpoint(playerid);
cp_dt[playerid][4] = 0;
cp_dt[playerid][5] = 1;
SetPlayerCheckpoint(playerid, -725.6901,2053.5120,59.9146, 10);
return 1;
}
if(cp_dt[playerid][5] == 1)
{
DisablePlayerCheckpoint(playerid);
cp_dt[playerid][5] = 0;
cp_dt[playerid][6] = 1;
SetPlayerCheckpoint(playerid, -422.8124,1386.5260,30.5953, 10);
return 1;
}
if(cp_dt[playerid][6] == 1)
{
DisablePlayerCheckpoint(playerid);
cp_dt[playerid][6] = 0;
cp_dt[playerid][7] = 1;
SetPlayerCheckpoint(playerid, 10.5495,1259.1892,9.5569, 10);
return 1;
}
if(cp_dt[playerid][7] == 1)
{
DisablePlayerCheckpoint(playerid);
cp_dt[playerid][7] = 0;
cp_dt[playerid][8] = 1;
SetPlayerCheckpoint(playerid, 268.2963,1228.5605,15.3085, 10);
return 1;
}
if(cp_dt[playerid][8] == 1)
{
DisablePlayerCheckpoint(playerid);
cp_dt[playerid][8] = 0;
cp_dt[playerid][9] = 1;
SetPlayerCheckpoint(playerid, 814.0144,1862.4476,3.9492, 10);
return 1;
}
if(cp_dt[playerid][9] == 1)
{
DisablePlayerCheckpoint(playerid);
cp_dt[playerid][9] = 0;
cp_dt[playerid][10] = 1;
SetPlayerCheckpoint(playerid, 880.8972,2651.5720,28.9446, 10);
return 1;
}
if(cp_dt[playerid][10] == 1)
{
DisablePlayerCheckpoint(playerid);
cp_dt[playerid][10] = 0;
cp_dt[playerid][11] = 1;
SetPlayerCheckpoint(playerid, -237.1201,2755.3247,62.3378, 10);
return 1;
}
if(cp_dt[playerid][11] == 1)
{
DisablePlayerCheckpoint(playerid);
cp_dt[playerid][11] = 0;
dini_IntSet(PlayerFile(playerid), "Drivinglicense", 1);
PlayerInfo[playerid][Drivinglicense] = dini_Int(PlayerFile(playerid), "Drivinglicense");
return 1;
}