16.02.2018, 17:34
I Have problem with checkpoints, when player enter checkpoint nothing happens.
Race checkpoints work fine, but this callback "OnPlayerEnterCheckpoint" doesn't react...
CODE
VIDEO
This part showed in the video is a bus driver job, and its starts from
Race checkpoints work fine, but this callback "OnPlayerEnterCheckpoint" doesn't react...
CODE
VIDEO
This part showed in the video is a bus driver job, and its starts from
Код:
case 14: { print("dobro0"); if( GetVehicleModel( GetPlayerVehicleID( playerid ) ) == 437 && GetPlayerState( playerid ) == 2 ) { print("dobro1"); if( BusLinija[ playerid ] < 11 ) { Fusion_DisablePlayerCheckpoint( playerid ); BusLinija[ playerid ]++; CheckpointStatus[ playerid ] = 14; } print("dobro2"); if( BusLinija[ playerid ] == 2 ) Fusion_SetPlayerCheckpoint( playerid, 963.2554, -1330.4203, 13.4962, 5.0 ); else if( BusLinija[ playerid ] == 3 ) Fusion_SetPlayerCheckpoint( playerid, 1222.1409, -1284.2852, 13.5143, 5.0 ); else if( BusLinija[ playerid ] == 4 ) Fusion_SetPlayerCheckpoint( playerid, 1426.8865, -1244.3213, 13.5173, 5.0 ); else if( BusLinija[ playerid ] == 5 ) Fusion_SetPlayerCheckpoint( playerid, 1346.6564, -926.8917, 35.0315, 5.0 ); else if( BusLinija[ playerid ] == 6 ) Fusion_SetPlayerCheckpoint( playerid, 1082.9972, -945.1513, 42.7620, 5.0 ); else if( BusLinija[ playerid ] == 7 ) Fusion_SetPlayerCheckpoint( playerid, 394.6435, -1344.8381, 14.7427, 5.0 ); else if( BusLinija[ playerid ] == 8 ) Fusion_SetPlayerCheckpoint( playerid, 346.2153, -1648.3312, 33.1769, 5.0 ); else if( BusLinija[ playerid ] == 9 ) Fusion_SetPlayerCheckpoint( playerid, 1119.5483, -1708.8313, 13.5159, 5.0 ); else if( BusLinija[ playerid ] == 10 ) Fusion_SetPlayerCheckpoint( playerid, 921.5195, -1713.4103, 13.5967, 5.0 ); else if( BusLinija[ playerid ] == 11 ) { new time = gettime( ); new ostatak = ( NovoVreme[ playerid ] - ( time - StaroVreme[ playerid ] ) ); if( ( time - StaroVreme[ playerid ] ) < NovoVreme[ playerid ] ) { SendErrorMessage( playerid, "Dosli ste ranije na marker nego sto je predvidjeno. " ); SendErrorMessage( playerid, "Sacekajte jos %d sekundi i udjite ponovo u marker.", ostatak ); format( globalstring, sizeof( globalstring ), "| "col_server"x"col_white"Game"col_server"Warden "col_acheat"| %s[ID: %d] je stigao na marker pre vremena( za %d od %d sekundi ).", ImeIgraca( playerid ), playerid, (NovoVreme[ playerid ]-ostatak), NovoVreme[ playerid ] ); AdminPoruka( ANTICHEAT, globalstring ); return 1; } print("dobro3"); Fusion_SetVehicleToRespawn( GetPlayerVehicleID( playerid ) ); Fusion_DisablePlayerCheckpoint( playerid ); TogglePlayerControllable( playerid, true ); BusLinija[ playerid ] = 0; CheckpointStatus[ playerid ] = 0; Fusion_KillTimer( BusVozac[ playerid ] ); new bonus = random( 400 ); if(ddeal_busvozac == true) { //PlayerInfo[ playerid ][ xPlatniRacun ] += (PLATA_BUSVOZAC+bonus)*2; DajIgracuPlatu(playerid); SavePlayer( playerid ); update_sm_info_tds(playerid); PlayerInfo[ playerid ][ xPosaoPoen ]++; //format( globalstring, sizeof( globalstring ), ""col_job"Uspesno ste zavrsili bus liniju!(DAILY DEAL - PLATA*2)\n\n"col_white"Plata: "col_job"%d$\n"col_white"Bonus: "col_job"%d$", PLATA_BUSVOZAC*2, bonus ); //SPD( playerid, 0, DSMSG, D_NASLOV, globalstring, "Ok", "" ); } else if(ddeal_busvozac == false) { //PlayerInfo[ playerid ][ xPlatniRacun ] += (PLATA_BUSVOZAC+bonus); DajIgracuPlatu(playerid); PlayerInfo[ playerid ][ xPosaoPoen ]++; SavePlayer( playerid ); update_sm_info_tds(playerid); //format( globalstring, sizeof( globalstring ), ""col_job"Uspesno ste zavrsili bus liniju!\n\n"col_white"Plata: "col_job"%d$\n"col_white"Bonus: "col_job"%d$", PLATA_BUSVOZAC, bonus ); //SPD( playerid, 0, DSMSG, D_NASLOV, globalstring, "Ok", "" ); } StaroVreme[ playerid ] = 0; NovoVreme[ playerid ] = 0; BussinesJobMoney( POSAO_BUSVOZAC, ((PLATA_BUSVOZAC+bonus)/10) ); return 1; } print("dobro4"); TogglePlayerControllable( playerid, false ); BusVozac[ playerid ] = SetTimerEx( "UtovarBus", 5000, false, "d", playerid ); GameTextForPlayer( playerid, "~y~Stanica", 5000, 3 ); } }