Skip to content

Instantly share code, notes, and snippets.

@shavitush
shavitush / v83_actions.cpp
Created June 9, 2020 15:29
GMS v83 character action data
aCharacterActionData =
{
BSTR_INIT("walk1"),
BSTR_INIT("walk2"),
BSTR_INIT("stand1"),
BSTR_INIT("stand2"),
BSTR_INIT("alert"),
BSTR_INIT("swingO1"),
BSTR_INIT("swingO2"),
BSTR_INIT("swingO3"),
@shavitush
shavitush / xxhash.hpp
Last active February 17, 2021 12:59
Single header C++17 RAII wrapper for xxHash states and ultra fast file checksums
#pragma once
#include <any>
#include <cstdint>
#include <fstream>
#include <filesystem>
#include <xxhash.h>
class file_not_found_exception : public std::runtime_error
{
template<typename T>
T sig_scan(const uint32_t dwStart, const uint32_t dwEnd, const uint8_t abPattern[], const char aMask[], const size_t dwPatternSize)
{
for(uint32_t i = dwStart; i < dwEnd; i++)
{
for(uint32_t x = 0; x < dwPatternSize; x++)
{
const uint8_t bMemory = *reinterpret_cast<uint8_t*>(i + x);
if(aMask[x] == 'x' && bMemory != abPattern[x])

Windia client mods

Note: Anticheat related features are omitted from this list for obvious reasons.

  1. !notice uses a custom color
  2. .ini configuration
  3. @vote integration
  4. Added minimize button for the game client window
  5. Airborne teleporting
@shavitush
shavitush / cityban.sma
Created October 18, 2016 15:53
AMXX City Bans
// some macros so it's easier for me to use AMXX
#define null INVALID_HANDLE
#define view_as<%1>(%2) %1:(%2)
#define char new
#define int new
#define File new
#define void
#include <amxmodx>
#include <amxmisc>
@shavitush
shavitush / example.sp
Created September 22, 2016 23:05
SourcePawn example for someone that requested it!
// has all the main functions you will be using.
#include <sourcemod>
// initialize variables
float gF_MyNumber = 0.2;
int gI_MyNumber = 3;
any gA_MyNumber = 5; // can be everything!
char gC_MyChar = view_as<char>('a'); // casting
// void OnPluginStart()
@shavitush
shavitush / randomnumber.sma
Last active October 12, 2016 17:45
AMXX Jailbreak random number vote
// UNTESTED!!!!
// Licensed under GNU GPL v3
// License copy: https://gist.github.com/ebe17e6a328bfe354ac30016a807cc16
#include <amxmodx>
#include <cstrike>
#pragma semicolon 1
#pragma ctrlchar '\'
@shavitush
shavitush / givelr.sp
Last active August 22, 2016 23:39
jailbreak givelr
#include <sourcemod>
#include <sdktools>
#include <cstrike>
#pragma semicolon 1
#pragma newdecls required
char gS_Prefix[32];
bool gB_GiveLR = false;
@shavitush
shavitush / standup_core_ljmode.sp
Created August 17, 2016 14:37
standup_core_ljmode with bhoptimer support
#include <sourcemod>
#include <standup/stocks_chat>
#include <standup/core>
#include <standup/ljmode>
#define USES_STYLE_PROPERTIES
#include <shavit>
@shavitush
shavitush / Respects SourceBans
Last active May 14, 2016 18:41
SM Connection message
#include <sourcemod>
#pragma semicolon 1
#pragma newdecls required
bool gB_MessagePrinted[MAXPLAYERS+1];
char gS_NameColor[16];