You can check if the player is in one of those two checkpoints you created for the car CPs. You need to store the cpid to a variable, so:
PHP код:
// variable:
new CarCP[2][MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
CarCP[0][playerid] = CPS_AddCheckpoint(88.9491,2051.5032,18.0701, 3.7, 40);
CarCP[1][playerid] = CPS_AddCheckpoint(-158.9680,2634.4512,63.5709, 3.7, 40);
SpawnedCar[playerid] = 0;
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
if (CPS_IsPlayerInCheckpoint(playerid, CarCP[0][playerid]) || CPS_IsPlayerInCheckpoint(playerid, CarCP[1][playerid]))
{
PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
ShowPlayerDialog(playerid, 2386, DIALOG_STYLE_LIST, "Cars", "Landstalker ($125,000)\nElegy ($200,000)\nInfernus ($500,000)\nSultan ($350,000)\nFlash ($300,000)\nBuffalo ($475,000)\nMonster ($775,000)\nCheetah ($375,555)\nSlamvan ($430,000)\nFortune ($450,550)\nBullet ($475,550)\nAdmiral ($175,000)\nHotknife ($490,000)\nElegant ($403, 500)\nSuper-Gt ($498,500)\nZr-350 ($475,550)", "Buy", "Cancel");
}
return 1;
}