pawn Код:
#include < a_samp >
#if defined MAX_PLAYERS
#undef MAX_PLAYERS
#define MAX_PLAYERS 32 // Slosts Seu Servidor ^^
#endif
new Text: Textdraw0 [ MAX_PLAYERS ];
new Text: Textdraw1 [ MAX_PLAYERS ];
new Text: Textdraw2 [ MAX_PLAYERS ];
new Text: Textdraw3 [ MAX_PLAYERS ];
new Text: Textdraw4 [ MAX_PLAYERS ];
new Text: Textdraw5 [ MAX_PLAYERS ];
forward Actualizando ( playerid ) ;
public OnGameModeInit( )
{
SetTimer ( "Actualizando", 100, 1 ) ;
for( new i = 0; i < MAX_PLAYERS; ++i )
{
Textdraw0[ i ] = TextDrawCreate(503.000000, 364.000000, "~g~Nome Jogador: ~w~Cantiliano"); //Troca pela Sua
TextDrawBackgroundColor(Textdraw0[ i ], 255);
TextDrawFont(Textdraw0[ i ], 1);
TextDrawLetterSize(Textdraw0[ i ], 0.220000, 1.300000);
TextDrawColor(Textdraw0[ i ], -1);
TextDrawSetOutline(Textdraw0[ i ], 1);
TextDrawSetProportional(Textdraw0[ i ], 1);
TextDrawSetSelectable(Textdraw0[ i ], 0);
Textdraw1[ i ] = TextDrawCreate(503.000000, 381.000000, "~r~Level: ~w~1000"); //Troca pela Sua
TextDrawBackgroundColor(Textdraw1[ i ], 255);
TextDrawFont(Textdraw1[ i ], 1);
TextDrawLetterSize(Textdraw1[ i ], 0.220000, 1.300000);
TextDrawColor(Textdraw1[ i ], -1);
TextDrawSetOutline(Textdraw1[ i ], 1);
TextDrawSetProportional(Textdraw1[ i ], 1);
TextDrawSetSelectable(Textdraw1[ i ], 0);
Textdraw2[ i ] = TextDrawCreate(503.000000, 398.000000, "~p~Nao sei: ~w~10"); //Troca pela Sua
TextDrawBackgroundColor(Textdraw2[ i ], 255);
TextDrawFont(Textdraw2[ i ], 1);
TextDrawLetterSize(Textdraw2[ i ], 0.220000, 1.300000);
TextDrawColor(Textdraw2[ i ], -1);
TextDrawSetOutline(Textdraw2[ i ], 1);
TextDrawSetProportional(Textdraw2[ i ], 1);
TextDrawSetSelectable(Textdraw2[ i ], 0);
Textdraw3[ i ] = TextDrawCreate(503.000000, 413.000000, "~y~Chupa: ~w~30"); //Troca pela Sua
TextDrawBackgroundColor(Textdraw3[ i ], 255);
TextDrawFont(Textdraw3[ i ], 1);
TextDrawLetterSize(Textdraw3[ i ], 0.220000, 1.300000);
TextDrawColor(Textdraw3[ i ], -1);
TextDrawSetOutline(Textdraw3[ i ], 1);
TextDrawSetProportional(Textdraw3[ i ], 1);
TextDrawSetSelectable(Textdraw3[ i ], 0);
Textdraw4[ i ] = TextDrawCreate(547.000000, 434.000000, "~p~Status"); //Troca pela Sua
TextDrawBackgroundColor(Textdraw4[ i ], 255);
TextDrawFont(Textdraw4[ i ], 1);
TextDrawLetterSize(Textdraw4[ i ], 0.220000, 1.300000);
TextDrawColor(Textdraw4[ i ], -1);
TextDrawSetOutline(Textdraw4[ i ], 1);
TextDrawSetProportional(Textdraw4[ i ], 1);
TextDrawSetSelectable(Textdraw4[ i ], 0);
Textdraw5[ i ] = TextDrawCreate(529.000000, 434.000000, "[] []"); //Troca pela Sua
TextDrawBackgroundColor(Textdraw5[ i ], 255);
TextDrawFont(Textdraw5[ i ], 2);
TextDrawLetterSize(Textdraw5[ i ], 0.220000, 1.300000);
TextDrawColor(Textdraw5[ i ], -65281);
TextDrawSetOutline(Textdraw5[ i ], 1);
TextDrawSetProportional(Textdraw5[ i ], 1);
TextDrawSetSelectable(Textdraw5[ i ], 0);
}
return 1;
}
public OnGameModeExit()
{
for( new i = 0; i < MAX_PLAYERS; ++i )
{
TextDrawHideForPlayer( i, Textdraw0[ i ] );
TextDrawDestroy( Textdraw0[ i ] );
TextDrawHideForPlayer( i, Textdraw1[ i ] );
TextDrawDestroy( Textdraw1[ i ] );
TextDrawHideForPlayer( i, Textdraw2[ i ] );
TextDrawDestroy( Textdraw2[ i ] );
TextDrawHideForPlayer( i, Textdraw3[ i ] );
TextDrawDestroy( Textdraw3[ i ] );
TextDrawHideForPlayer( i, Textdraw4[ i ] );
TextDrawDestroy( Textdraw4[ i ] );
TextDrawHideForPlayer( i, Textdraw5[ i ] );
TextDrawDestroy( Textdraw5[ i ] );
}
return 1;
}
public OnPlayerConnect( playerid )
{
TextDrawShowForPlayer( playerid, Textdraw0 [ playerid ] ) ;
TextDrawShowForPlayer( playerid, Textdraw1 [ playerid ] ) ;
TextDrawShowForPlayer( playerid, Textdraw2 [ playerid ] ) ;
TextDrawShowForPlayer( playerid, Textdraw3 [ playerid ] ) ;
TextDrawShowForPlayer( playerid, Textdraw4 [ playerid ] ) ;
TextDrawShowForPlayer( playerid, Textdraw5 [ playerid ] ) ;
return 1;
}
public Actualizando ( playerid )
{
for ( new i = 0; i < MAX_PLAYERS; i++ )
{
if ( IsPlayerConnected ( i ) )
{
new string [ 128 ] ;
format ( string, sizeof ( string ),"~g~Nome Jogador: ~w~%s: ", GetPlayerNameEx ( playerid ) ) ; //Troca pela Sua
TextDrawSetString ( Textdraw0[ i ] , string ) ;
format ( string, sizeof(string),"~r~Level: ~w~ " /*Sua Funзao */ ); //Troca pela Sua
TextDrawSetString ( Textdraw1[ i ] , string ) ;
format ( string, sizeof(string),"~p~Nao sei: ~w~ " /*Sua Funзao */ ); //Troca pela Sua
TextDrawSetString ( Textdraw2[ i ] , string ) ;
format ( string, sizeof(string),"~y~Chupa: ~w~ " /*Sua Funзao */ ); //Troca pela Sua
TextDrawSetString ( Textdraw3[ i ] , string ) ;
}
}
return 1;
}
stock GetPlayerNameEx ( playerid )
{
new PlayerNameLevel [ MAX_PLAYER_NAME ] ;
GetPlayerName ( playerid, PlayerNameLevel, MAX_PLAYER_NAME ) ;
return PlayerNameLevel ;
}