Skip to content

Instantly share code, notes, and snippets.

View 21Joakim's full-sized avatar
🚀
Taking on new challenges

Joakim 21Joakim

🚀
Taking on new challenges
  • Stockholm, Sweden
View GitHub Profile
@21Joakim
21Joakim / BhopPlugin.cs
Created January 27, 2025 19:41
Example of how to use ReplicateConVar to enable bhop on a per player basis.
using CounterStrikeSharp.API.Core;
using CounterStrikeSharp.API.Core.Attributes.Registration;
using CounterStrikeSharp.API.Modules.Commands;
using CounterStrikeSharp.API.Modules.Memory.DynamicFunctions;
using CounterStrikeSharp.API.Modules.Cvars;
// Example of how to use ReplicateConVar
// to enable bhop on a per player basis.
public class BhopPlugin : BasePlugin
{
@21Joakim
21Joakim / FogPlugin.cs
Created August 27, 2024 15:39
CS2: Fog example (env_fog_controller)
using CounterStrikeSharp.API;
using CounterStrikeSharp.API.Core;
using CounterStrikeSharp.API.Core.Attributes.Registration;
using CounterStrikeSharp.API.Core.Attributes;
using CounterStrikeSharp.API.Modules.Commands;
using CounterStrikeSharp.API.Modules.Memory;
using System.Drawing;
using System.Reflection;
namespace CS2Plugin;
@21Joakim
21Joakim / RemovePlayerClipping.cs
Created June 11, 2024 12:26
CS2: Remove player clipping
// Remove the player clipping, this means you can walk outside the map and go up into the sky unrestricted,
// might be useful for a flying scoutsman type gamemode. As a side effect of this it's likely any stairs
// won't be smooth anymore (your view will jump up a little each step) because it uses the same player clipping.
// Found this by removing each of the flags set one at a time.
public const long SOLID_MASK_PLAYERCLIP = 16;
// How to find
// 1. Find the `dev_create_move_report` convar and check the function it's used in,
// this is a method of CCSPlayer_MovementServices, the first argument is the movement services.
@21Joakim
21Joakim / NavMesh.cs
Last active April 20, 2025 13:19
CS2 NavMesh
using CounterStrikeSharp.API;
using CounterStrikeSharp.API.Core;
using CounterStrikeSharp.API.Modules.Memory.DynamicFunctions;
using CounterStrikeSharp.API.Modules.Utils;
using System.Collections;
using System.Diagnostics;
using System.Runtime.InteropServices;
namespace CS2Plugin.Native;