Skip to content

Instantly share code, notes, and snippets.

/**
* Sourcemod 1.7 Plugin Template
*/
#pragma semicolon 1
#include <sourcemod>
#include <sdktools>
#pragma newdecls required
/**
* Raw access to TF2 condition data.
*/
#if defined __tf_cond_info_dma_included
#endinput
#endif
#define __tf_cond_info_dma_included
@nosoop
nosoop / read_sm_plugin.py
Created October 22, 2019 04:35
Dumps information from SMX files
#!/usr/bin/python3
# tfw no working sources to ensure values are correct
# https://web.archive.org/web/20100705221006/http://code.devicenull.org:80/index.php?title=Python:PluginReader
# https://wcfan.de/diverse/spfile.php
import struct, zlib, io, hashlib
@nosoop
nosoop / clone_gameinfo.py
Created September 19, 2019 08:24
ctrl+c, ctrl+v srcds/cs:go but smol and largely untested
#!/usr/bin/python3
'''
gameinfo cloner for CS:GO
takes an existing CS:GO dedicated server installation and an empty directory and links / copies /
modifies files in the latter to create a runnable server
'''
import os
import pathlib
@nosoop
nosoop / entprops.h
Last active September 2, 2019 06:10
Some code to pull properties out of entities in a nice-looking way with a SourceMod extension
#pragma once
#include "re.h"
#include <sm_stringhashmap.h>
template <typename T>
inline T* sendprop_ptr(const void* pEntity, const char* classname, const char* prop) {
sm_sendprop_info_t info;
if (!gamehelpers->FindSendPropInfo(classname, prop, &info)) {
return nullptr;
@nosoop
nosoop / big_num.sp
Last active September 6, 2021 02:39
Conversion of large numbers to strings
#include <sourcemod>
#pragma semicolon 1
#pragma newdecls required
public void OnPluginStart() {
char buffer[64];
int divisor = 12345;
int base = 0x10;
@nosoop
nosoop / steam_workshop_filter.user.js
Last active April 12, 2019 13:00
Provides a few tools to hide Steam Workshop entries. (Tested on ViolentMonkey.)
// ==UserScript==
// @name Steam Workshop Filter
// @namespace steam-community-workshop-hot-garbage-filter
// @description Provides a button to fade out certain Steam Workshop entries.
// @include https://steamcommunity.com/workshop/browse/*
// @version 2.0
// @grant GM_getValue
// @grant GM_setValue
// ==/UserScript==
// jshint esversion:6
@nosoop
nosoop / makesig.idc
Created February 5, 2019 23:00
makesig.idc with fixes for IDA 7.0
#include <idc.idc>
/* makesig.idc: IDA script to automatically create and wildcard a function signature.
* Copyright 2014, Asher Baker
*
* This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
@nosoop
nosoop / steam-image-webp-cache-busting.user.js
Created January 26, 2019 14:51
Temporary fix for Steam's UGC servers serving WebP images to Firefox users.
// ==UserScript==
// @name Steam Image Fixer
// @description Forces Steam to regenerate image files because their cache is serving WebP to Firefox users.
// @namespace steam-image-webp-cache-busting
// @match https://steamcommunity.com/*
// @grant none
// @run-at document-start
// ==/UserScript==
let rewrite_image_url = (image) => {
"Games"
{
"tf"
{
"Addresses"
{
"CTraceFilterObject::ShouldHitEntity()::TFBotCollideWithBuildings"
{
"signature" "CTraceFilterObject::ShouldHitEntity()"
"linux"