Advertisement
miguelspastes

Low health

Jan 15th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. local last_call = globals.TickCount( );
  2.  
  3. function draw_health_alert( )
  4. local local_player = entities.GetLocalPlayer( );
  5. local w,h = draw.GetScreenSize( );
  6. if ( local_player and local_player:IsAlive( ) and local_player:GetHealth( ) < 27 and globals.TickCount( ) - last_call > 54 ) then
  7. draw.Color( 255,0,0,183 );
  8. draw.RoundedRectFill( 1, 1, w, h );
  9. last_call = globals.TickCount( );
  10. end
  11.  
  12. end
  13.  
  14. callbacks.Register( "Draw", "drawhealthalert", draw_health_alert );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement