Advertisement
LinkiNPark

red_draw

Oct 13th, 2012
370
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.40 KB | None | 0 0
  1. /*
  2.         by: LinkiNPark 21.09.2012
  3. */
  4. #include a_samp
  5. #define public:L_%0(%1) \
  6.     forward %0(%1); public %0(%1)
  7. new
  8.     L_ctext[] = {
  9.         0xFF151500, 0xFF151511, 0xFF151522, 0xFF151533, 0xFF151544,
  10.     },
  11.     Text: L_text, Float: L_hp[ MAX_PLAYERS ][ 2 ] ;
  12.  
  13. public OnFilterScriptInit()
  14. {
  15.     L_text = TextDrawCreate ( -5.00, -5.00, "."), TextDrawBackgroundColor ( L_text, 0xFF151544);
  16.     TextDrawFont ( L_text, 1), TextDrawLetterSize ( L_text, 0.000, 51.099);
  17.     TextDrawColor ( L_text, -1), TextDrawSetOutline ( L_text, 0);
  18.     TextDrawSetProportional ( L_text, 1), TextDrawSetShadow ( L_text, 1);
  19.     TextDrawUseBox ( L_text, 1), TextDrawBoxColor ( L_text, 0xFF151544);
  20.     TextDrawTextSize ( L_text, 643.00, 0.00);
  21.     return 1 ;
  22. }
  23. public OnFilterScriptExit()
  24. {
  25.     TextDrawHideForAll ( L_text ) ;
  26.     return 1 ;
  27. }
  28. public OnPlayerUpdate( playerid )
  29. {
  30.     GetPlayerHealth( playerid, L_hp[playerid][ 0 ]) ;
  31.     if ( L_hp[ playerid ][ 0 ] < L_hp[ playerid ][ 1 ] )
  32.     {
  33.         if ( !GetPVarInt(playerid, "hp" ) ) SetPVarInt(playerid, "hp", true ), Red ( playerid, 4 ),
  34.             L_hp[playerid][ 1 ] = L_hp[playerid][ 0 ];
  35.     }
  36.     else L_hp[playerid][ 1 ] = L_hp[playerid][ 0 ] ;
  37.     return 1 ;
  38. }
  39. public:L_Red ( playerid, indx )
  40. {
  41.     TextDrawBoxColor( L_text, L_ctext[ indx ] ), TextDrawShowForPlayer( playerid, L_text);
  42.     if ( !indx ) return SetPVarInt(playerid, "hp", false ) ;
  43.     SetTimerEx ( "Red", 65, false, "ii", playerid, indx - 1 ) ;
  44.     return 1 ;
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement