How to make the checkpoint to be in the air? I add but he is on the ground. Or how i can make it to be from the ground to air?
I dont understand nothing. Can you make it for me, it's a job checkpoints.
Код:
#define pilotCheckPoint1 1468.6799,1585.4291,49.1005
#define pilotCheckPoint2 1141.6888,1558.6499,101.9031
#define pilotCheckPoint3 939.1237,1835.2043,52.7981
#define pilotCheckPoint4 1160.9729,2221.1306,61.2828
#define pilotCheckPoint5 1575.9364,2270.8740,73.6554
#define pilotCheckPoint6 1874.6361,2180.3340,87.7429
#define pilotCheckPoint7 1953.6245,1433.3972,53.9461
#define pilotTakePoint 1480.4420,1223.4127,11.7393
this is a checkpoint where it's type is 3 (Air normal type) placed on the coordinate of definition "pilotCheckPoint1"
the next coordinates are the position where the arrow will face (which is usually supposed to be the next checkpoint, "pilotCheckPoint2")
I fly thru the checkpoint and the checkpoint is still there and nothing happend..
Код:
#define pilotCheckPoint1 1468.6799,1585.4291,49.1005
#define pilotCheckPoint2 1141.6888,1558.6499,101.9031
#define pilotCheckPoint3 939.1237,1835.2043,52.7981
#define pilotCheckPoint4 1160.9729,2221.1306,61.2828
#define pilotCheckPoint5 1575.9364,2270.8740,73.6554
#define pilotCheckPoint6 1874.6361,2180.3340,87.7429
#define pilotCheckPoint7 1953.6245,1433.3972,53.9461
#define pilotTakePoint 1480.4420,1223.4127,11.7393
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 513)
{
if (IsPlayerInRangeOfPoint(playerid, 7.0,pilotCheckPoint1))
{
SetPlayerRaceCheckpoint(playerid, 3, 1468.6799,1585.4291,49.1005, 1141.6888,1558.6499,101.9031, 5.0);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,pilotCheckPoint2))
{
SetPlayerRaceCheckpoint(playerid, 3, 1141.6888,1558.6499,101.9031, 939.1237,1835.2043,52.7981, 5.0);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,pilotCheckPoint3))
{
SetPlayerRaceCheckpoint(playerid, 3, 939.1237,1835.2043,52.7981, 1160.9729,2221.1306,61.2828, 5.0);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,pilotCheckPoint4))
{
SetPlayerRaceCheckpoint(playerid, 3, 1160.9729,2221.1306,61.2828, 1575.9364,2270.8740,73.6554, 5.0);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,pilotCheckPoint5))
{
SetPlayerRaceCheckpoint(playerid, 3, 1575.9364,2270.8740,73.6554, 1874.6361,2180.3340,87.7429, 5.0);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,pilotCheckPoint6))
{
SetPlayerRaceCheckpoint(playerid, 3, 1874.6361,2180.3340,87.7429, 1953.6245,1433.3972,53.9461, 5.0);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,pilotCheckPoint7))
{
SetPlayerRaceCheckpoint(playerid, 3, 1953.6245,1433.3972,53.9461, 1480.4420,1223.4127,11.7393, 5.0);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,pilotTakePoint))
{
SendClientMessage(playerid,COLOR_YELLOW,"Ти завърши работата като пилот и получи $7000 и 3 EP!");
GivePlayerMoney(playerid, 7000);
PlayerInfo[playerid][pPilot1] = 1;
PlayerInfo[playerid][Exp]+= 3;
SetPlayerVirtualWorld(playerid, 0);
if(PlayerInfo[playerid][pDonateRank] == 4 || PlayerInfo[playerid][pTimeVip] == 1)
{
SendClientMessage(playerid,COLOR_YELLOW,"VIP LEVEL 4 + 1EP.");
PlayerInfo[playerid][Exp]+= 1;
}
if(PlayerInfo[playerid][pDonateRank] == 5 || PlayerInfo[playerid][pTimeVip] == 1)
{
SendClientMessage(playerid,COLOR_YELLOW,"VIP LEVEL 5 + 2EP.");
PlayerInfo[playerid][Exp]+= 2;
}
if(PlayerInfo[playerid][pDonateRank] >= 6 || PlayerInfo[playerid][pTimeVip] == 1)
{
SendClientMessage(playerid,COLOR_YELLOW,"VIP LEVEL 6 + 3EP.");
PlayerInfo[playerid][Exp]+= 3;
}
if(PlayerInfo[playerid][pDonateRank] == 7 || PlayerInfo[playerid][pTimeVip] == 1)
{
SendClientMessage(playerid,COLOR_YELLOW,"VIP LEVEL 7 + 4EP.");
PlayerInfo[playerid][Exp]+= 4;
}
if(PlayerInfo[playerid][pDonateRank] <= 3 || PlayerInfo[playerid][pTimeVip] == 1)
{
PlayerInfo[playerid][pPilot] = 60*60;
}
if(PlayerInfo[playerid][pDonateRank] == 4 || PlayerInfo[playerid][pTimeVip] == 1)
{
PlayerInfo[playerid][pPilot] = 30*60;
}
if(PlayerInfo[playerid][pDonateRank] == 5 || PlayerInfo[playerid][pTimeVip] == 1)
{
PlayerInfo[playerid][pPilot] = 30*60;
}
if(PlayerInfo[playerid][pDonateRank] >= 6 || PlayerInfo[playerid][pTimeVip] == 1)
{
PlayerInfo[playerid][pPilot] = 20*60;
}
if(PlayerInfo[playerid][pDonateRank] == 7 || PlayerInfo[playerid][pTimeVip] == 1)
{
PlayerInfo[playerid][pPilot] = 10*60;
}
SetPlayerColor(playerid, TeamInfo[PlayerInfo[playerid][pMember]][TeamColor]);
RemovePlayerFromVehicle(playerid);
DisablePlayerCheckpoint(playerid);
SetPlayerVirtualWorld(playerid, 0);
pilot[playerid] = 0;
}
}
instead of checking distances to a checkpoint.
Otherwise your timer must be very fast to check for a distance of 7 meters.
Using a plane, you fly much too fast to be able to check if you're in range.
On one timer-iteration, you may be 9 meters in front of it.
The next iteration, you may find yourself 10 meters behind it.
It will rarely trigger.