Coder Social home page Coder Social logo

gmsv_network's Introduction

๐Ÿ”ง gmsv_network โš™๏ธ

A Garry's Mod binary serverside module that provide GLua access to basic server and client functions. Designed to replace the tracking of many events that require gm_sourcenet (which produces lua panic on many servers, corrupted message buffer reads, and decreased optimization). Currently under development.

Available functions and hooks

Check example for detailed usage. All functions placed in global gmnetwork table.

CBaseServer:
GetNumClients GetNumProxies GetNumFakeClients GetMaxClients GetUDPPort GetClientCount GetTime GetTick GetTickInterval GetName GetMapName GetSpawnCount GetNumClasses GetClassBits GetNetStats GetNumPlayers GetCPUUsage IsActive IsLoading IsDedicated IsPaused IsMultiplayer IsPausable IsHLTV IsReplay GetPassword SetMaxClients SetPaused SetPassword DisconnectClient DisconnectClientSilent

IVEngineServer:
GMOD_RawServerCommand

HandleClientError:
EnableClientErrHandle
[Hook] GmNetwork.OnClientErr (ply_id: number, err: string) -> prevent_default: bool

ProcessCmd:
EnableClientProcessCmd
[Hook] GmNetwork.ProcessCmd (ply_id: number, cmd: string) -> prevent_default: any bool

LuaAutoRefresh:
EnableLuaAutoRefreshHandle
[Hook] GmNetwork.OnLuaRefresh (file_path: string) -> prevent_default: any bool

Other:
Version (string)

Planned

Method to mark entities with function like SetTransmitControl
Hook when marked entities about to be writen in svc_PacketEntities, allow to suppress
Methods/Hooks for g_GameEventManager with ability suppress and create events
Hook when clients send net_SetConVar to server
Some methods and hooks for vphysics interface (?)
Hook when ents change their PVS for player (literally magic with sv_ents_write.cpp)

Requirements

  1. Garrysmod Common - A framework to facilitate the creation of compilations files (Visual Studio, make, XCode, etc). Simply set the environment variable GARRYSMOD_COMMON or the premake option --gmcommon=path to the path of your local copy of garrysmod_common.
  2. Scanning Advanced - My helpful module contains symbols for sigscanning with garrysmod_common. Should be installed in third-party folder with name gmc_scanning_advanced.
  3. (Linux) Installed gcc-multilib and g++-multilib packages.

All requirements already added in repository as submodules. Make sure that you clone them with recursive!
git clone https://github.com/klen-list/gmsv_network --recursive

Compiling

  1. Download or install premake5
  2. Enter the project folder and run:
  • ./premake5.exe vs2019 (Windows with installed Visual Studio 2019 and locally placed premake5.exe)
  • ./premake5 gmake (Linux with installed build-essential and locally placed premake5)
    โš ๏ธ If you catch Error: module 'premake-export-compile-commands/export-compile-commands' not found you didn't clone submodules correctly! Read above about clone command.
  1. Move to projects/{os_platform}/{vs2019|gmake} and run gm_network.sln (Windows) or run make command (Linux)

gmsv_network's People

Contributors

dankmolot avatar klen-list avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.