Guest User

Untitled

a guest
Jan 5th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.46 KB | None | 0 0
  1. public OnPlayerUpdate( playerid )
  2. {
  3.  
  4.  
  5. if( IsPlayerInAnyVehicle( playerid )&& GetPlayerState( playerid ) == PLAYER_STATE_DRIVER ) {
  6. new vehicle = GetPlayerVehicleID( playerid );
  7. if( !IsVehicleBajs( vehicle ) ) { //&& !IsVehicleBrod( vehicle ) ) {// && !IsVehicleLetelica( vehicle ) ) {
  8.  
  9. new string[ 30 ];
  10. format( string, sizeof( string ), "%d", GetSpeed( playerid ) );
  11. PlayerTextDrawSetString( playerid, KILOMETARSATTD[ playerid ][14], string );
  12. new stringic[ 30 ];
  13. format( stringic, sizeof( stringic ), "%dL", Fuel[ vehicle ] );
  14. PlayerTextDrawSetString( playerid, KILOMETARSATTD[ playerid ][17], stringic );
  15. new stringic1[ 30 ];
  16. format( stringic1, sizeof( stringic1 ), "%s", GetVehicleFuelType( vehicle ) );
  17. PlayerTextDrawSetString( playerid, KILOMETARSATTD[ playerid ][16], stringic1 );
  18. new stringic12[ 30 ];
  19. format( stringic12, sizeof( stringic12 ), "~w~%s", GetVehicleNameEx( GetVehicleModel( GetPlayerVehicleID( playerid ) ) ) );
  20. PlayerTextDrawSetString( playerid, KILOMETARSATTD[ playerid ][15], stringic12 );
  21.  
  22. new Float:H; GetVehicleHealth( vehicle, H );
  23. new motor, svjetla, alarm, vrata, hauba, tockovi, objective;
  24. GetVehicleParamsEx(vehicle, motor, svjetla, alarm, vrata, hauba, tockovi, objective);
  25. if( H < 600.0)
  26. {
  27. PlayerTextDrawHide(playerid,KILOMETARSATPLAYER[ playerid ][2]);
  28. PlayerTextDrawBoxColor(playerid,KILOMETARSATPLAYER[ playerid ][2], -8388506);
  29. PlayerTextDrawShow(playerid,KILOMETARSATPLAYER[ playerid ][2]);
  30. }
  31. else if( H > 600.0 )//moguc bug moguc bag
  32. {
  33.  
  34. PlayerTextDrawHide(playerid,KILOMETARSATPLAYER[ playerid ][2]);
  35. PlayerTextDrawBoxColor(playerid,KILOMETARSATPLAYER[ playerid ][2], 102);
  36. PlayerTextDrawShow(playerid,KILOMETARSATPLAYER[ playerid ][2]);
  37. }
  38.  
  39. if(svjetla == VEHICLE_PARAMS_ON)
  40. {
  41. PlayerTextDrawHide(playerid,KILOMETARSATPLAYER[ playerid ][0]);//box svjetala
  42. PlayerTextDrawBoxColor(playerid,KILOMETARSATPLAYER[ playerid ][0], 3302570);//upaljena svjetla
  43. PlayerTextDrawShow(playerid,KILOMETARSATPLAYER[ playerid ][0]);//box svjetala
  44. }
  45. else if(svjetla == VEHICLE_PARAMS_OFF)
  46. {
  47. PlayerTextDrawHide(playerid,KILOMETARSATPLAYER[ playerid ][0]);//box svjetala
  48. PlayerTextDrawBoxColor(playerid,KILOMETARSATPLAYER[ playerid ][0], 102);//Ugasena svjetla
  49. PlayerTextDrawShow(playerid,KILOMETARSATPLAYER[ playerid ][0]);//box svjetala
  50. }
  51.  
  52.  
  53.  
  54.  
  55. }
  56. }
Advertisement
Add Comment
Please, Sign In to add comment