Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- new
- Text:Textdraw[ 3 ],
- rank[ MAX_PLAYERS ];
- public OnFilterScriptInit( )
- {
- Textdraw[ 0 ] = TextDrawCreate( 414.000000, 404.000000, "Score:~r~" );
- TextDrawBackgroundColor( Textdraw[ 0 ], 16711935 );
- TextDrawFont( Textdraw[ 0 ], 2 );
- TextDrawLetterSize( Textdraw[ 0 ], 0.529999, 2.599999 );
- TextDrawColor( Textdraw[ 0 ], 65535 );
- TextDrawSetOutline( Textdraw[ 0 ], 1 );
- TextDrawSetProportional( Textdraw[ 0 ], 1 );
- Textdraw[ 1 ] = TextDrawCreate( 414.000000, 424.000000, "Money:~r~" );
- TextDrawBackgroundColor( Textdraw[ 1 ], 16711935 );
- TextDrawFont( Textdraw[ 1 ], 2 );
- TextDrawLetterSize( Textdraw[ 1 ], 0.559999, 2.299999 );
- TextDrawColor( Textdraw[ 1 ], 65535 );
- TextDrawSetOutline( Textdraw[ 1 ], 1 );
- TextDrawSetProportional( Textdraw[ 1 ], 1 );
- Textdraw[ 2 ] = TextDrawCreate( 414.000000, 384.000000, "Rank:~r~" );
- TextDrawBackgroundColor( Textdraw[ 2 ], 16711935 );
- TextDrawFont( Textdraw[ 2 ], 2 );
- TextDrawLetterSize( Textdraw[ 2 ], 0.570000, 2.700000 );
- TextDrawColor( Textdraw[ 2 ], 65535 );
- TextDrawSetOutline( Textdraw[ 2 ], 1 );
- TextDrawSetProportional( Textdraw[ 2 ], 1 );
- return 1;
- }
- public OnPlayerSpawn( playerid )
- {
- for( new i = 0; i < 3; i++ )
- {
- TextDrawShowForPlayer( playerid, Textdraw[ i ] );
- }
- return 1;
- }
- public OnPlayerUpdate( playerid )
- {
- new
- string[ 30 ];
- format( string, sizeof string, "Patirtis:~r~ %d", GetPlayerScore( playerid ) );
- TextDrawSetString( Textdraw[ 0 ], string );
- format( string, sizeof string, "Pinigai:~r~ %d", GetPlayerMoney( playerid ) );
- TextDrawSetString(Textdraw[ 1 ], string );
- if( GetPlayerScore( playerid ) < 10000 )
- {
- rank[ playerid ] = 0;
- }
- else
- {
- rank[ playerid ] = GetPlayerScore( playerid ) / 10000;
- }
- format( string, sizeof string, "Rangas:~r~ %d", rank[ playerid ] );
- TextDrawSetString( Textdraw[ 2 ], string );
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement