[FilterScript] classic speedometer
#1

Hello, I want to show off your speedometer.
I do not know English and use a translator: D, I'm sorry for the mistakes ..



If there is no image, please click here
PHP код:
#include a_samp
#define L_MAX_COUNT 105
new
    
L_count[ ][ ] = {
        
"0""20""40""60""80""100""120",
        
"140""160""180""200""220"
    
},
    
TextL_draw_speed14 ],
    
TextL_player_drawMAX_PLAYERS ],
    
FloatL_speed_update],
    
L_text_update155 ] ;
public 
OnFilterScriptInit ( )
{
    
L_draw_speed] = TextDrawCreate 190400.0L_count] ) ;
    
L_speed_update] = 210 ;
    for ( new 
!= 12 ; ++ )
    {
        if ( 
L_draw_speed] = TextDrawCreate L_speed_update], 400.0L_count] ), L_speed_update] += 30.0 ;
        
TextDrawColor L_draw_speed], 0xDEDDDC55 ), TextDrawAlignment L_draw_speed], ) ;
        
TextDrawBackgroundColor L_draw_speed],0x00000011 ), TextDrawSetOutline L_draw_speed], ) ;
        
TextDrawSetProportional L_draw_speed], ), TextDrawSetShadow L_draw_speed], ) ;
        
TextDrawFont L_draw_speed], ), TextDrawLetterSize L_draw_speed], 0.31.1 ) ;
    }
    
L_speed_update] = 408.0 ;
    for ( new 
12 != 14; ++ )
        
L_draw_speed] = TextDrawCreate 130.0L_speed_update], "-" ),
        
TextDrawColor L_draw_speed], 0xDEDDDCFF ), TextDrawAlignment L_draw_speed], ),
        
TextDrawBackgroundColor L_draw_speed], 0x00000022 ), TextDrawSetOutline L_draw_speed], ),
        
TextDrawSetProportional L_draw_speed] , ), TextDrawSetShadow L_draw_speed], ),
        
TextDrawFont L_draw_speed], ), TextDrawLetterSize L_draw_speed], 43.00.8 ), L_speed_update] -= 13.0 ;
    
SetTimer "SpeedUpdate"50false ) ;
    return 
1;
}
public 
OnFilterScriptExit ( )
{
    for ( new 
!= sizeof L_draw_speed ; ++ )
    
TextDrawDestroy L_draw_speed] ) ;
    return 
;
}
public 
OnPlayerConnect playerid )
{
    
L_player_drawplayerid ] = TextDrawCreate190.0377.0"-" ), TextDrawAlignment L_player_draw[playerid], ) ;
    
TextDrawBackgroundColor L_player_drawplayerid ],0x00000022 ), TextDrawSetOutline L_player_draw[playerid], ) ;
    
TextDrawSetProportional L_player_drawplayerid ], ), TextDrawSetShadow L_player_drawplayerid ], ) ;
    
TextDrawFont L_player_drawplayerid ], ), TextDrawLetterSizeL_player_drawplayerid ], 0.35.5 ) ;
    return 
;
}
public 
OnPlayerDisconnect playeridreason )
{
    
TextDrawDestroyL_player_draw[playerid] ) ;
    return 
;
}
public 
OnPlayerStateChange playeridnewstateoldstate )
{
    if ( 
newstate == )
    {
        for ( new 
!= 14++ ) TextDrawShowForPlayer playeridL_draw_speed] ) ;
        
TextDrawShowForPlayer playeridL_player_drawplayerid ] ) ;
    }
    else
    {
        for ( new 
!= 14; ++ TextDrawHideForPlayer playeridL_draw_speed] ) ;
        
TextDrawHideForPlayerplayeridL_player_drawplayerid ] ) ;
    }
    return 
;
}
forward SpeedUpdate ( ) ;
public 
SpeedUpdate ( )
{
    for ( new 
!= MAX_PLAYERS i++ )
    {
        if ( !
IsPlayerConnected) ) continue;
        if ( 
GetPlayerState) != ) continue;
        
GetVehicleVelocity GetPlayerVehicleID),L_speed_update],L_speed_update],L_speed_update] ) ;
        
L_speed_update] = floatsqroot floatpower floatabs L_speed_update] ), 2.0 ) + floatpower floatabs L_speed_update] ), 2.0 ) + floatpower floatabs L_speed_update] ), 2.0 ) ) * 179.28625 ;
        
L_Update_Textifloatround L_speed_update] * 0.4 ) ) ;
    }
    
SetTimer "SpeedUpdate"50false ) ;
    return 
1;
}
L_Update_Text icount )
{
    new 
L_index_count150 ] = { ' ', ... } ;
    if ( 
count L_MAX_COUNT L_index_countcount ] = '-' ;
        else 
L_index_countL_MAX_COUNT ] = '-' ;
    
L_text_update] = EOS ;
    
format L_text_update155"%s"L_index_count ) ;
    
TextDrawSetString L_player_draw], L_text_update ) ;

Download:Click Here

new script here https://sampforum.blast.hk/showthread.php?tid=493103
Reply
#2

Nice!
Reply
#3

He added the screens . good job , good work - Rep+

Edit : Mirrored the download . It is in .pwn file now . All the credits goes to you and they are in the .pwn files too

Click here for the mirror
Reply
#4

nice, can help with gasoline?=)
Reply
#5

Great visuals here
Reply
#6

thanks
Quote:
Originally Posted by сан саныч
Посмотреть сообщение
nice, can help with gasoline?=)
Yes, I can help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)