17.10.2015, 15:51
(
Последний раз редактировалось nGen.SoNNy; 17.10.2015 в 21:55.
)
When i use it for the first time it's working but when i'm reaching the destination this script will not set the next checkpoint...
pawn Код:
stock SelectNextAirport( playerid )
{
if( IsPlayerInRangeOfPoint( playerid, 500.0, 1931.3154, -2428.1130, 13.7668 ) ) // Los Santos
{
DisablePlayerCheckpoint( playerid );
switch( random( 3 ) )
{
case 0: SetPlayerCheckpointGPS( playerid, "LV Airport", 1322.7965, 1338.9646, 10.9210 ); // LV
case 1: SetPlayerCheckpointGPS( playerid, "SF Airport", -1335.5999, -221.0418, 14.1484 ); // SF
case 2: SetPlayerCheckpointGPS( playerid, "AA Airport", 414.7618, 2508.5496, 16.4844 ); // AA
}
}
else if( IsPlayerInRangeOfPoint( playerid, 500.0, -1335.5999, -221.0418, 14.1484 ) ) // Las Ventura
{
DisablePlayerCheckpoint( playerid );
switch( random( 3 ) )
{
case 0: SetPlayerCheckpointGPS( playerid, "LS Airport", 1931.3154, -2428.1130, 13.7668 ); // LS
case 1: SetPlayerCheckpointGPS( playerid, "SF Airport", -1335.5999, -221.0418,14.1484 ); // SF
case 2: SetPlayerCheckpointGPS( playerid, "AA Airport", 414.7618, 2508.5496, 16.4844 ); // AA
}
}
else if( IsPlayerInRangeOfPoint( playerid, 500.0, 414.7618, 2508.5496, 16.4844 ) ) // San Fierro
{
DisablePlayerCheckpoint( playerid );
switch( random( 3 ) )
{
case 0: SetPlayerCheckpointGPS( playerid, "LS Airport", 1931.3154, -2428.1130, 13.7668 ); // LS
case 1: SetPlayerCheckpointGPS( playerid, "LV Airport", 1322.7965, 1338.9646, 10.9210 ); // LV
case 2: SetPlayerCheckpointGPS( playerid, "AA Airport", 414.7618, 2508.5496, 16.4844 ); // AA
}
}
else if( IsPlayerInRangeOfPoint( playerid, 500.0, 1322.7965, 1338.9646, 10.9210 ) ) // Abandoned
{
DisablePlayerCheckpoint( playerid );
switch( random( 3 ) )
{
case 0: SetPlayerCheckpointGPS( playerid, "LS Airport", 1931.3154, -2428.1130, 13.7668 ); // LS
case 1: SetPlayerCheckpointGPS( playerid, "LV Airport", 1322.7965, 1338.9646, 10.9210 ); // LV
case 2: SetPlayerCheckpointGPS( playerid, "SF Airport", -1335.5999, -221.0418, 14.1484 ); // SF
}
}
playerVariables[ playerid ][ pCheckpoint ] = 3001;
}