Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local WIDGET = {}
- function WIDGET:WidgetInit()
- self:SetWidgetSize(256, 256)
- print ("Your widget init'd")
- end
- function WIDGET:WidgetPaint(w, h)
- local rationtime = 0
- if ( SERVER ) then
- rationtimedata = player:GetCharacterData("nextration")
- Clockwork.datastream:Start(player, "RationTimeData", rationtimedata);
- end
- Clockwork.datastream:Hook("RationTimeData", function(data)
- rationtime = data;
- end);
- //surface.DrawRect(-14, -14, 28, 28)
- surface.SetFont( "hl2_PlayerInfoText" )
- surface.SetTextColor( 255, 255, 255, 255 )
- surface.SetTextPos( 0, 0 )
- surface.DrawText( "Next Ration: ".. rationtime )
- end
- Schema.widget:Register("Next Ration", WIDGET)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement