14.02.2018, 14:19
Well, guys.. I (tried) make simple job , but I have problem with 1st CP..
When I come to 1st CP , it nothing happens, like I'm not there...
When I come to 1st CP , it nothing happens, like I'm not there...
Код:
BusLinija[ MAX_PLAYERS ],
Код:
case 10: {
if( GetVehicleModel( GetPlayerVehicleID( playerid ) ) == 431 && GetPlayerState( playerid ) == 2 ) {
if( BusLinija[ playerid ] < 11 ) {
Muma_DisablePlayerCheckpoint( playerid );
BusLinija[ playerid ]++;
CheckpointStatus[ playerid ] = 14;
}
if( BusLinija[ playerid ] == 2 ) Muma_SetPlayerCheckpoint( playerid, 963.2554, -1330.4203, 13.4962, 5.0 );
else if( BusLinija[ playerid ] == 3 ) Muma_SetPlayerCheckpoint( playerid, 1222.1409, -1284.2852, 13.5143, 5.0 );
else if( BusLinija[ playerid ] == 4 ) Muma_SetPlayerCheckpoint( playerid, 1426.8865, -1244.3213, 13.5173, 5.0 );
else if( BusLinija[ playerid ] == 5 ) Muma_SetPlayerCheckpoint( playerid, 1346.6564, -926.8917, 35.0315, 5.0 );
else if( BusLinija[ playerid ] == 6 ) Muma_SetPlayerCheckpoint( playerid, 1082.9972, -945.1513, 42.7620, 5.0 );
else if( BusLinija[ playerid ] == 7 ) Muma_SetPlayerCheckpoint( playerid, 394.6435, -1344.8381, 14.7427, 5.0 );
else if( BusLinija[ playerid ] == 8 ) Muma_SetPlayerCheckpoint( playerid, 346.2153, -1648.3312, 33.1769, 5.0 );
else if( BusLinija[ playerid ] == 9 ) Muma_SetPlayerCheckpoint( playerid, 1119.5483, -1708.8313, 13.5159, 5.0 );
else if( BusLinija[ playerid ] == 10 ) Muma_SetPlayerCheckpoint( playerid, 921.5195, -1713.4103, 13.5967, 5.0 );
else if( BusLinija[ playerid ] == 11 ) {
SetVehicleToRespawn( GetPlayerVehicleID( playerid ) );
Muma_DisablePlayerCheckpoint( playerid );
TogglePlayerControllable( playerid, true );
BusLinija[ playerid ] = 0;
CheckpointStatus[ playerid ] = 0;
Muma_KillTimer( BusVozac[ playerid ] );
new bonus = random( 500 );
format( globalstring, sizeof( globalstring ), ""col_job"Uspjesno ste zavrsili bus liniju!\n\n"col_white"Plata: "col_job"3000$\n"col_white"Bonus: "col_job"%d$", bonus );
SPD( playerid, 0, DSMSG, D_NASLOV, globalstring, "Ok", "" );
PlayerInfo[ playerid ][ xPlatniRacun ] += (3000+bonus);
SavePlayer( playerid );
StaroVreme[ playerid ] = 0;
NovoVreme[ playerid ] = 0;
BussinesJobMoney( POSAO_BUSVOZAC, ((2000+bonus)/10) );
return 1;
}
TogglePlayerControllable( playerid, false );
BusVozac[ playerid ] = SetTimerEx( "UtovarBus", 5000, false, "d", playerid );
GameTextForPlayer( playerid, "~y~Stanica", 5000, 3 );
}
}
case 11: {
Muma_DisablePlayerCheckpoint( playerid );
SCM( playerid, ZUTA, "Stigli ste na lokaciju.");
CheckpointStatus[ playerid ] = 0;
}
Код:
else if( PlayerInfo[ playerid ][ xPosao ] == POSAO_BUSVOZAC ) {
if( GetVehicleModel( GetPlayerVehicleID( playerid ) ) != 431 ) return GRESKA( playerid, "Niste u autobusu!");
if( BusLinija[ playerid ] != 0 ) return GRESKA( playerid, "Vec imas aktiviranu liniju, kucaj /prekiniposao!" );
Muma_SetPlayerCheckpoint( playerid, 920.9799, -1688.3843, 13.5080, 5.0 );
CheckpointStatus[ playerid ] = 14;
SendJobMessage( playerid, "Krenuli ste sa prevozom putnika, stanica je oznacena crveno na mapi!" );
BusLinija[ playerid ] = 1;
StaroVreme[ playerid ] = gettime();
NovoVreme[ playerid ] = 245;
return 1;
}


