Why this function it's not working?
#1

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;
}
Reply
#2

BUMP?
Reply
#3

Does "SetPlayerCheckpointGPS()" set a race checkpoint?

If so, use "DisablePlayerRaceCheckpoint(playerid);" instead of "DisablePlayerCheckpoint(playerid);".
Reply
#4

pawn Код:
stock SetPlayerCheckpointGPS( playerid, gpsName[ ], Float:gpsX, Float:gpsY, Float:gpsZ )
{
    GpsLocation( playerid, gpsName, gpsX, gpsY, gpsZ );
    SetPlayerCheckpoint( playerid, gpsX, gpsY, gpsZ, 20.0 );
}
If so.. should i use the RaceCheckpoint instead of playercheckpoint because i'm using it with a plane.
Reply
#5

Quote:
Originally Posted by nGen.SoNNy
Посмотреть сообщение
If so.. should i use the RaceCheckpoint instead of playercheckpoint because i'm using it with a plane.
Probably. You could however use race checkpoints also to make them approach on the right angles. Very interesting idea you have there, and could work out nicely.
Reply
#6

I changed few things and i'm using now PlayerRaceCheckpoints and everything it's ok thx guys for help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)