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


Messages In This Thread
Why this function it's not working? - by nGen.SoNNy - 17.10.2015, 15:51
Re: Why this function it's not working? - by nGen.SoNNy - 18.10.2015, 17:16
Re: Why this function it's not working? - by Kevln - 18.10.2015, 18:12
Re: Why this function it's not working? - by nGen.SoNNy - 19.10.2015, 10:58
Re: Why this function it's not working? - by Sew_Sumi - 19.10.2015, 11:28
Re: Why this function it's not working? - by nGen.SoNNy - 19.10.2015, 14:14

Forum Jump:


Users browsing this thread: 1 Guest(s)