Skocz do zawartości
  • Drogi gościu!

    Tutaj możesz się zarejestrować lub zalogować:

[RSS Pluginy] [CSGO] Fake Ping


GLOBALELITE.pl

Rekomendowane odpowiedzi

  • GLOBALELITE.PL
Hello ,This is new plugin was developed by me

but i think it's against to the valve policy :(

PHP Code:

#include <sourcemod>

#include <sdktools>

#include <sdkhooks>

 

 

new String:g_szPlayerManager[50] = "";

 

// Entities

new g_iPlayerManager    = -1;

 

// Offsets

new g_iPing                = -1;

 

#define PLUGIN_URL "https://github.com/McDaived"

#define PLUGIN_VERSION "1.0"

#define PLUGIN_AUTHOR "McDaived"

 

public Plugin:myinfo =

{

    

name "Ping Faker",

    

author PLUGIN_AUTHOR,

    

description "Change ping for the players on scoreboard",

    

version PLUGIN_VERSION,

    

url PLUGIN_URL

};

 

public 

OnPluginStart()

{

    

CreateConVar("fp_version"PLUGIN_VERSION""FCVAR_PLUGIN|FCVAR_REPLICATED|FCVAR_NOTIFY|FCVAR_CHEAT|FCVAR_DONTRECORD);

    

    

g_iPing    FindSendPropOffs("CPlayerResource""sm_iPing");

 

    

decl String:szBuffer[64];

    

GetGameFolderName(szBuffersizeof(szBuffer));

 

    if (

StrEqual("cstrike"szBuffer))

        

strcopy(g_szPlayerManagersizeof(g_szPlayerManager), "cs_player_manager");

    else if (

StrEqual("dod"szBuffer))

        

strcopy(g_szPlayerManagersizeof(g_szPlayerManager), "dod_player_manager");

    else

        

strcopy(g_szPlayerManagersizeof(g_szPlayerManager), "player_manager");

    

    

CreateTimer(2.0LoopClients_TIMER_REPEAT);

}

 

public 

OnMapStart()

{

    

g_iPlayerManager    FindEntityByClassname(MaxClients 1g_szPlayerManager);

    if (

g_iPlayerManager == -|| g_iPing == -1)

    {

        

SetFailState("Something is missing!");

    }

    

SDKHook(g_iPlayerManagerSDKHook_ThinkPostOnThinkPost);

    

}

 

new 

iPing[MAXPLAYERS+1];

public 

Action:LoopClients(Handle:timer)

{

    for (new 

1<= MaxClientsi++)

    {

        if (!

IsClientInGame(i)) continue;

        

        new 

ping Client_GetFakePing(ifalse);

        if (

ping <= 30)

        {

            continue;

        }

        else if (

ping <= 50)

        {

            

iPing[i] = GetRandomInt(2025);

        }

        else if (

ping <= 90)

        {

            

iPing[i] = GetRandomInt(5055);

        }

        else

        {

            

iPing[i] = GetRandomInt(7077);

        }

    }

}

 

public 

OnClientDisconnect(client)

{

    

iPing[client] = 0;

}

 

public 

OnThinkPost(entity)

{

    for (new 

target 1target <= MaxClientstarget++)

    {

        if (

iPing[target] != 0)

        {

            

SetEntData(g_iPlayerManagerg_iPing + (target 4), iPing[target]);

        }

    }

}

 

#define TICKS_TO_TIME(%1)    ( GetTickInterval() * %1 )

 

stock Client_GetFakePing(clientbool:goldSource=true)

{

    

decl ping;

    new 

Float:latency GetClientLatency(clientNetFlow_Outgoing); // in seconds

        

    // that should be the correct latency, we assume that cmdrate is higher 

    // then updaterate, what is the case for default settings

    

decl String:cl_cmdrate[4];

    

GetClientInfo(client"cl_cmdrate"cl_cmdratesizeof(cl_cmdrate));

 

    new 

Float:tickRate GetTickInterval();

    

latency -= (0.5 StringToInt(cl_cmdrate)) + TICKS_TO_TIME(1.0); // correct latency

 

    

if (goldSource) {

        

// in GoldSrc we had a different, not fixed tickrate. so we have to adjust

        // Source pings by half a tick to match the old GoldSrc pings.

        

latency -= tickRate 0.5;

    }

 

    

ping RoundFloat(latency 1000.0); // as msecs

    

ping Math_Clamp(ping51000); // set bounds, dont show pings under 5 msecs

    

    

return ping;

}

 

stock any:Math_Clamp(any:valueany:minany:max)

{

    

value Math_Min(valuemin);

    

value Math_Max(valuemax);

 

    return 

value;

}

 

stock any:Math_Max(any:valueany:max)

{    

    if (

value max) {

        

value max;

    }

    

    return 

value;

}

 

stock any:Math_Min(any:valueany:min)

{

    if (

value min) {

        

value min;

    }

    

    return 

value;

}

 

public 

Action OnClientCommand(int clientint args)

{

    

char cmd[16];

    

GetCmdArg(0cmdsizeof(cmd));

 

    if (

StrEqual(cmd"p_faker"))

    {

 

        return 

Plugin_Handled;

    }

 

    return 

Plugin_Continue;

}

 

public 

void_OnPluginStart()

{

    

RegConsoleCmd("iping"Command_Test);

}

 

public 

Action Command_Test(int clientint args)

{

    

char arg[128];

    

char full[256];

 

    

GetCmdArgString(fullsizeof(full));

 

    if (

client)

    {

        

PrintToServer("Ur Ping : %N");

    } else {

        

PrintToServer("done Fake ur Ping.");

    }

 

    

PrintToServer("done Fake ur Ping: %s"full);

    

PrintToServer("done Fake ur Ping: %d"args);

    for (

int i=1i<=argsi++)

    {

        

GetCmdArg(iargsizeof(arg));

        

PrintToServer("Argument %d: %s"iarg);

    }

    return 

Plugin_Handled;


Attached Files
File Type: 7z Ping Faker.7z (8.6 KB)

 

Wyświetl pełny artykuł

Odnośnik do odpowiedzi
Udostępnij na innych stronach

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
  • Ostatnio przeglądający

    Brak zarejestrowanych użytkowników przeglądających tę stronę.


O GLOBALELITE.PL


Chcemy pokazać absolutnie wszystkim, że człowiek jest zdolny do rzeczy wielkich! Potrzebujemy tylko waszej pomocy. Dzięki ciężkiej pracy chcemy udowodnić, że razem możemy wszystko! Szukamy ludzi ambitnych i skorych do poświeceń, ludzi którzy są godni, aby dołączyć do globalnej elity społeczności, którą traktuje się jak drugą rodzinę!

Istniejemy od 2014 r.

Motyw zrobiony przez doc

Strona zarządzana przez: Adam Plicha

Linki społecznościowe

Gdzie można nas znaleźć?


Facebook Teamspeak Discord

Linki forumowe

Linki z różnego rodzaju podaniami


Podanie o admina Prośba o unbana Propozycja Złóż skargę

Administracja

Oni odpowiedzą na Twoje pytania ;)


×
×
  • Dodaj nową pozycję...