Advertisement
Guest User

Untitled

a guest
May 28th, 2015
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. local WIDGET = {}
  2.  
  3. function WIDGET:WidgetInit()
  4. self:SetWidgetSize(256, 256)
  5. print ("Your widget init'd")
  6. end
  7.  
  8. function WIDGET:WidgetPaint(w, h)
  9.  
  10. local rationtime = 0
  11.  
  12. if ( SERVER ) then
  13. rationtimedata = player:GetCharacterData("nextration")
  14. Clockwork.datastream:Start(player, "RationTimeData", rationtimedata);
  15. end
  16.  
  17. Clockwork.datastream:Hook("RationTimeData", function(data)
  18. rationtime = data;
  19. end);
  20.  
  21. //surface.DrawRect(-14, -14, 28, 28)
  22.  
  23. surface.SetFont( "hl2_PlayerInfoText" )
  24. surface.SetTextColor( 255, 255, 255, 255 )
  25. surface.SetTextPos( 0, 0 )
  26. surface.DrawText( "Next Ration: ".. rationtime )
  27.  
  28. end
  29.  
  30. Schema.widget:Register("Next Ration", WIDGET)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement