Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerUpdate( playerid )
- {
- if( IsPlayerInAnyVehicle( playerid )&& GetPlayerState( playerid ) == PLAYER_STATE_DRIVER ) {
- new vehicle = GetPlayerVehicleID( playerid );
- if( !IsVehicleBajs( vehicle ) ) { //&& !IsVehicleBrod( vehicle ) ) {// && !IsVehicleLetelica( vehicle ) ) {
- new string[ 30 ];
- format( string, sizeof( string ), "%d", GetSpeed( playerid ) );
- PlayerTextDrawSetString( playerid, KILOMETARSATTD[ playerid ][14], string );
- new stringic[ 30 ];
- format( stringic, sizeof( stringic ), "%dL", Fuel[ vehicle ] );
- PlayerTextDrawSetString( playerid, KILOMETARSATTD[ playerid ][17], stringic );
- new stringic1[ 30 ];
- format( stringic1, sizeof( stringic1 ), "%s", GetVehicleFuelType( vehicle ) );
- PlayerTextDrawSetString( playerid, KILOMETARSATTD[ playerid ][16], stringic1 );
- new stringic12[ 30 ];
- format( stringic12, sizeof( stringic12 ), "~w~%s", GetVehicleNameEx( GetVehicleModel( GetPlayerVehicleID( playerid ) ) ) );
- PlayerTextDrawSetString( playerid, KILOMETARSATTD[ playerid ][15], stringic12 );
- new Float:H; GetVehicleHealth( vehicle, H );
- new motor, svjetla, alarm, vrata, hauba, tockovi, objective;
- GetVehicleParamsEx(vehicle, motor, svjetla, alarm, vrata, hauba, tockovi, objective);
- if( H < 600.0)
- {
- PlayerTextDrawHide(playerid,KILOMETARSATPLAYER[ playerid ][2]);
- PlayerTextDrawBoxColor(playerid,KILOMETARSATPLAYER[ playerid ][2], -8388506);
- PlayerTextDrawShow(playerid,KILOMETARSATPLAYER[ playerid ][2]);
- }
- else if( H > 600.0 )//moguc bug moguc bag
- {
- PlayerTextDrawHide(playerid,KILOMETARSATPLAYER[ playerid ][2]);
- PlayerTextDrawBoxColor(playerid,KILOMETARSATPLAYER[ playerid ][2], 102);
- PlayerTextDrawShow(playerid,KILOMETARSATPLAYER[ playerid ][2]);
- }
- if(svjetla == VEHICLE_PARAMS_ON)
- {
- PlayerTextDrawHide(playerid,KILOMETARSATPLAYER[ playerid ][0]);//box svjetala
- PlayerTextDrawBoxColor(playerid,KILOMETARSATPLAYER[ playerid ][0], 3302570);//upaljena svjetla
- PlayerTextDrawShow(playerid,KILOMETARSATPLAYER[ playerid ][0]);//box svjetala
- }
- else if(svjetla == VEHICLE_PARAMS_OFF)
- {
- PlayerTextDrawHide(playerid,KILOMETARSATPLAYER[ playerid ][0]);//box svjetala
- PlayerTextDrawBoxColor(playerid,KILOMETARSATPLAYER[ playerid ][0], 102);//Ugasena svjetla
- PlayerTextDrawShow(playerid,KILOMETARSATPLAYER[ playerid ][0]);//box svjetala
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment