public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
switch(checkpointid)
{
case your_cp:
{
if(IsPlayerInAnyVehicle(playerid))
{
SetVehicleToRespawn(GetPlayerVehicleID(playerid));
}
}
}
return 1;
}