Вопрос Поменять пинг из таба, на пинг из нет графа onetap v4

И шо тут писать?:)
Начинающий
Статус
Оффлайн
Регистрация
5 Апр 2020
Сообщения
79
Реакции[?]
11
Поинты[?]
0
Код:
function FPSandLatency() {
    
/* Get screen size for positions */
    var ScreenSize = Render.GetScreenSize();



/* Get custom fonts for the strings */
    var font = Render.GetFont( "/resources/Montserrat-Regular.ttf", 12, false)
    var font2 = Render.GetFont( "/resources/Montserrat-Light.ttf", 12, false)
    var font3 = Render.GetFont( "/resources/Montserrat-Regular.ttf", 10, false)
    var font4 = Render.GetFont( "/resources/Montserrat-Bold.ttf", 13, false)



/* FPS */

    /* Render background for the FPS strings */
    var rr1x = (ScreenSize[0] - (ScreenSize[0]/2)) - 89;
    var rr1y = Math.ceil(ScreenSize[1] - 89);
    
    var rc1x = (ScreenSize[0] - (ScreenSize[0]/2)) - 89;
    var rc1y = Math.ceil(ScreenSize[1] - 75);
    
    Render.FilledRect( rr1x, rr1y, 70, 29, [ 26, 26, 30, 255 ] );
    Render.FilledCircle( rc1x, rc1y, 14, [ 26, 26, 30, 255 ] );

    /* Get FPS and render strings */

    var f1x = ScreenSize[0] - (ScreenSize[0]/2) - 59;
    var f1y = Math.ceil(ScreenSize[1] - 82);
    
    var f2x = (ScreenSize[0] - (ScreenSize[0]/2)) - 92;
    var f2y = Math.ceil(ScreenSize[1] - 83);
    
    Fps = Math.floor(1 / Global.Frametime());
    Render.String(f1x,f1y,0, "" + Fps, [255, 255, 255, 255], font2)
    Render.String(f2x,f2y,0, "FPS", [255, 255, 255, 255], font4)
    
    

/* Latency */

    /* Render background for the latency strings */

    var lr1x = (ScreenSize[0] - (ScreenSize[0]/2)) +16;
    var lr1y = Math.ceil(ScreenSize[1] - 89);
    
    var lc1x = (ScreenSize[0] - (ScreenSize[0]/2)) +89;
    var lc1y = Math.ceil(ScreenSize[1] - 75);
    
    Render.FilledRect( lr1x, lr1y, 75, 29, [ 26, 26, 30, 255 ] );
    Render.FilledCircle( lc1x, lc1y, 14, [ 26, 26, 30, 255 ] );   
    
    /* Get ping and render strings */

    var p1x = ScreenSize[0] - (ScreenSize[0]/2) + 49;
    var p1y = Math.ceil(ScreenSize[1] - 82);
    
    var p2x = (ScreenSize[0] - (ScreenSize[0]/2)) +72;
    var p2y = Math.ceil(ScreenSize[1] - 83);

    ping = "" + Math.round(Entity.GetProp(Entity.GetLocalPlayer(), 'CPlayerResource', 'm_iPing'))
        if (ping == "NaN") {
       ping = "0";
    }
    Render.String(p1x,p1y,0, ping, [255, 255, 255, 255], font2)
    Render.String(p2x,p2y,0, "MS", [255, 255, 255, 255], font4)



/* Render center circle with logo */
    
    var c1x = ScreenSize[0] - (ScreenSize[0]/2);
    var c1y = Math.ceil(ScreenSize[1] - 75);

    var c2x = ScreenSize[0] - (ScreenSize[0]/2);
    var c2y = Math.ceil(ScreenSize[1] - 75);

    var c3x = ScreenSize[0] - (ScreenSize[0]/2) - 13;
    var c3y = Math.ceil(ScreenSize[1] - 93);

    Render.FilledCircle( c2x, c2y, 32, [ 250, 166, 24, 255 ] );
    Render.FilledCircle( c1x, c1y, 30, [ 26, 26, 30, 255 ] );
    skull = Render.AddTexture("ot/scripts/resources/Skull.png");
    Render.TexturedRect( c3x, c3y, 28, 34, skull );

}

Cheat.RegisterCallback("Draw", "FPSandLatency")
Буду благодарен если поможете
 
Пользователь
Статус
Оффлайн
Регистрация
24 Апр 2018
Сообщения
445
Реакции[?]
86
Поинты[?]
3K
Код:
function FPSandLatency() {
  
/* Get screen size for positions */
    var ScreenSize = Render.GetScreenSize();



/* Get custom fonts for the strings */
    var font = Render.GetFont( "/resources/Montserrat-Regular.ttf", 12, false)
    var font2 = Render.GetFont( "/resources/Montserrat-Light.ttf", 12, false)
    var font3 = Render.GetFont( "/resources/Montserrat-Regular.ttf", 10, false)
    var font4 = Render.GetFont( "/resources/Montserrat-Bold.ttf", 13, false)



/* FPS */

    /* Render background for the FPS strings */
    var rr1x = (ScreenSize[0] - (ScreenSize[0]/2)) - 89;
    var rr1y = Math.ceil(ScreenSize[1] - 89);
  
    var rc1x = (ScreenSize[0] - (ScreenSize[0]/2)) - 89;
    var rc1y = Math.ceil(ScreenSize[1] - 75);
  
    Render.FilledRect( rr1x, rr1y, 70, 29, [ 26, 26, 30, 255 ] );
    Render.FilledCircle( rc1x, rc1y, 14, [ 26, 26, 30, 255 ] );

    /* Get FPS and render strings */

    var f1x = ScreenSize[0] - (ScreenSize[0]/2) - 59;
    var f1y = Math.ceil(ScreenSize[1] - 82);
  
    var f2x = (ScreenSize[0] - (ScreenSize[0]/2)) - 92;
    var f2y = Math.ceil(ScreenSize[1] - 83);
  
    Fps = Math.floor(1 / Global.Frametime());
    Render.String(f1x,f1y,0, "" + Fps, [255, 255, 255, 255], font2)
    Render.String(f2x,f2y,0, "FPS", [255, 255, 255, 255], font4)
  
  

/* Latency */

    /* Render background for the latency strings */

    var lr1x = (ScreenSize[0] - (ScreenSize[0]/2)) +16;
    var lr1y = Math.ceil(ScreenSize[1] - 89);
  
    var lc1x = (ScreenSize[0] - (ScreenSize[0]/2)) +89;
    var lc1y = Math.ceil(ScreenSize[1] - 75);
  
    Render.FilledRect( lr1x, lr1y, 75, 29, [ 26, 26, 30, 255 ] );
    Render.FilledCircle( lc1x, lc1y, 14, [ 26, 26, 30, 255 ] ); 
  
    /* Get ping and render strings */

    var p1x = ScreenSize[0] - (ScreenSize[0]/2) + 49;
    var p1y = Math.ceil(ScreenSize[1] - 82);
  
    var p2x = (ScreenSize[0] - (ScreenSize[0]/2)) +72;
    var p2y = Math.ceil(ScreenSize[1] - 83);

    ping = "" + Math.round(Entity.GetProp(Entity.GetLocalPlayer(), 'CPlayerResource', 'm_iPing'))
        if (ping == "NaN") {
       ping = "0";
    }
    Render.String(p1x,p1y,0, ping, [255, 255, 255, 255], font2)
    Render.String(p2x,p2y,0, "MS", [255, 255, 255, 255], font4)



/* Render center circle with logo */
  
    var c1x = ScreenSize[0] - (ScreenSize[0]/2);
    var c1y = Math.ceil(ScreenSize[1] - 75);

    var c2x = ScreenSize[0] - (ScreenSize[0]/2);
    var c2y = Math.ceil(ScreenSize[1] - 75);

    var c3x = ScreenSize[0] - (ScreenSize[0]/2) - 13;
    var c3y = Math.ceil(ScreenSize[1] - 93);

    Render.FilledCircle( c2x, c2y, 32, [ 250, 166, 24, 255 ] );
    Render.FilledCircle( c1x, c1y, 30, [ 26, 26, 30, 255 ] );
    skull = Render.AddTexture("ot/scripts/resources/Skull.png");
    Render.TexturedRect( c3x, c3y, 28, 34, skull );

}

Cheat.RegisterCallback("Draw", "FPSandLatency")
Буду благодарен если поможете
const ping = Math.abs(Local.Latency() * 1000 - 16).toFixed(2);
Возможно поможет
А так есть js на net graph
От туда можно взять
 
И шо тут писать?:)
Начинающий
Статус
Оффлайн
Регистрация
5 Апр 2020
Сообщения
79
Реакции[?]
11
Поинты[?]
0
Сверху Снизу