This is the code under, OnPlayerEnterCheckpoint,altough only the first checkpoint shows when the command is executed
pawn Код:
switch(playerVariables[playerid][pDMVCP]) {
case 1: {
if(IsPlayerInAnyVehicle(playerid)) {
DisablePlayerCheckpoint(playerid);
playerVariables[playerid][pDMVCP]=2;
SetPlayerCheckpoint(playerid, 1523.6827, -1590.2843, 13.2578, 5);
}
}
case 2: {
if(IsPlayerInAnyVehicle(playerid)) {
DisablePlayerCheckpoint(playerid);
playerVariables[playerid][pDMVCP]=3;
SetPlayerCheckpoint(playerid, 1446.2994, -1590.2749, 13.2578, 5);
}
}
case 3: {
if(IsPlayerInAnyVehicle(playerid)) {
DisablePlayerCheckpoint(playerid);
playerVariables[playerid][pDMVCP]=4;
SetPlayerCheckpoint(playerid, 1326.0253, -1571.0778, 13.2417, 5);
}
}
case 4: {
if(IsPlayerInAnyVehicle(playerid)) {
DisablePlayerCheckpoint(playerid);
playerVariables[playerid][pDMVCP]=5;
SetPlayerCheckpoint(playerid, 1344.4739, -1490.9305, 13.2617, 5);
}
}
case 5: {
if(IsPlayerInAnyVehicle(playerid)) {
DisablePlayerCheckpoint(playerid);
playerVariables[playerid][pDMVCP]=6;
SetPlayerCheckpoint(playerid, 1359.2864, -1354.1941, 13.2578, 5);
}
}
case 6: {
if(IsPlayerInAnyVehicle(playerid)) {
DisablePlayerCheckpoint(playerid);
playerVariables[playerid][pDMVCP]=7;
SetPlayerCheckpoint(playerid, 1378.8693, -961.6216, 33.8986, 5);
}
}
case 7: {
if(IsPlayerInAnyVehicle(playerid)) {
DisablePlayerCheckpoint(playerid);
playerVariables[playerid][pDMVCP]=8;
SetPlayerCheckpoint(playerid, 1334.7042, -930.1490, 35.8285, 5);
}
}
case 8: {
if(IsPlayerInAnyVehicle(playerid)) {
DisablePlayerCheckpoint(playerid);
playerVariables[playerid][pDMVCP]=9;
SetPlayerCheckpoint(playerid, 1020.4492, -958.6176, 42.1135, 5);
}
}
case 9: {
if(IsPlayerInAnyVehicle(playerid)) {
DisablePlayerCheckpoint(playerid);
playerVariables[playerid][pDMVCP]=10;
SetPlayerCheckpoint(playerid, 809.1130, -1044.6431, 24.8044, 5);
}
}
case 10: {
if(IsPlayerInAnyVehicle(playerid)) {
DisablePlayerCheckpoint(playerid);
playerVariables[playerid][pDMVCP]=11;
SetPlayerCheckpoint(playerid, 621.9476, -1253.2637, 17.5538, 5);
}
}
case 11: {
if(IsPlayerInAnyVehicle(playerid)) {
DisablePlayerCheckpoint(playerid);
playerVariables[playerid][pDMVCP]=12;
SetPlayerCheckpoint(playerid, 1535.9294, -1677.1328, 13.2578, 5);//LSPD Front
}
}
case 12: {
if(IsPlayerInAnyVehicle(playerid)) {
playerVariables[playerid][pDMVCP]=13;//Finished the test
playerVariables[playerid][pDMVCP]=1;
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_GREEN, "You have successfully finished the test and recieved your driver's license.");
}
}
}
Everything seems logic and fine to me.There are no errors about it,or warnings.
If you are trying to be able to set more than one checkpoint at a time. It is not possible without a streamer. Try using this:
No,i'm not trying to set more checkpoints than one.The thing is,when player enters the first checkpoint another one appears (of course the first one is removed) and so on..but it doesn't happen.