Advertisement
Mister_Stefan

watermark otv4

Jun 26th, 2021
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. UI.AddSubTab(["Visuals", "SUBTAB_MGR"], "Watermark")
  2. UI.AddColorPicker(["Visuals", "Watermark", "Watermark"], "Watermark color")
  3. UI.AddTextbox(["Visuals", "Watermark", "Watermark"], "prefix")
  4. var color = UI.GetColor(["Visuals", "Watermark", "Watermark", "Watermark color"]);
  5.  
  6. if (color[3] == 0)
  7.     UI.SetColor(["Visuals", "Watermark", "Watermark", "Watermark color"], [250, 164, 22, 255]);
  8.  
  9. function draw() {
  10.     if(!World.GetServerString())
  11.         return;
  12.  
  13.     var today = new Date();
  14.     var hours1 = today.getHours();
  15.     var minutes1 = today.getMinutes();
  16.     var seconds1 = today.getSeconds();
  17.  
  18.     boxtext = UI.GetString(["Visuals", "Watermark", "Watermark", "prefix"]);
  19.  
  20.     var show_edition = [1 , boxtext];
  21.    
  22.     var hours = hours1 <= 9 ? "0"+hours1+":" : hours1+":";
  23.     var minutes = minutes1 <= 9 ? "0" + minutes1+":" : minutes1+":";
  24.     var seconds = seconds1 <= 9 ? "0" + seconds1 : seconds1;
  25.    
  26.     var server_tickrate = Globals.Tickrate().toString()
  27.     var ebanaya_hueta = Math.round(Entity.GetProp(Entity.GetLocalPlayer(), "CPlayerResource", "m_iPing")).toString()
  28.  
  29.     color = UI.GetColor(["Visuals", "Watermark", "Watermark", "Watermark color"]);
  30.  
  31.     var font = Render.AddFont("Verdana", 10, 800);
  32.     var text = "gamesense " + show_edition[1] + " | " + Cheat.GetUsername() + " | " + World.GetServerString() + " | delay: " + ebanaya_hueta + "ms | " + server_tickrate + "tick | " + hours + minutes + seconds;
  33.    
  34.     var w = Render.TextSize(text, font)[0] + 8;
  35.     var x = Global.GetScreenSize()[0];
  36.  
  37.     x = x - w - 10;
  38.     Render.FilledRect(x, 10, w, 2, [ color[0], color[1], color[2], 255 ]);
  39.     Render.FilledRect(x, 12, w, 16, [ 17, 17, 17, color[3] ]);
  40.     Render.String(x+3, 10 + 2, 0, text, [ 255, 255, 255, 255 ], font);
  41. }
  42.  
  43. Cheat.RegisterCallback("Draw", "draw");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement