Skip to content

Instantly share code, notes, and snippets.

View Southclaws's full-sized avatar
🌸
live laugh love'n my way to aesthetic nirvana

Barnaby Keene Southclaws

🌸
live laugh love'n my way to aesthetic nirvana
View GitHub Profile
@Southclaws
Southclaws / BoxRoamConstrain
Created September 30, 2013 14:02
Creates a bunch of blue sticks, then lets them roam around an aircraft hangar in Area 69. Example of constraining AI to a set area, can be used on NPCs too.
#define FILTERSCRIPT
#include <a_samp>
#include <YSI\y_iterate>
#include <streamer>
#define MAX_BOT (128)
#define MIN_X (266.98685)
@Southclaws
Southclaws / binaryvsencoded.cpp
Last active January 3, 2016 15:19
File function tests
#define FILTERSCRIPT
#include <a_samp>
#include <sscanf>
#include <y_speedtest>
#define BINARY_FILE "test.dat"
#define ENCODE_FILE "test.txt"
#define TESTS 1000
@Southclaws
Southclaws / hitspread.cpp
Last active August 29, 2015 13:56
A testing script for rendering lines on camera and bullet vectors for hit spread analysis.
#define FILTERSCRIPT
#include <a_samp>
#include <streamer> // by Incognito - github.com/samp-incognito/samp-streamer-plugin/releases
#include <SIF/Core.pwn> // by Southclaw - github.com/Southclaw/SIF
#include <strlib> // by Slice - github.com/oscar-broman/strlib
#include <Line> // by Southclaw - github.com/Southclaw/Line
#include <ZCMD> // by Zeex - forum.sa-mp.com/showthread.php?t=91354
/*==============================================================================
Infinite Ammo
Dependencies:
tickcountfix: https://github.com/Southclaw/ScavengeSurvive/blob/master/gamemodes/SS/utils/tickcountfix.pwn
AdvancedWeaponData: https://github.com/Southclaw/AdvancedWeaponData
==============================================================================*/
// Experimental hack detector
static
def_CurrentCheckDefence[MAX_PLAYERS],
Timer: def_AngleCheckTimer[MAX_PLAYERS];
public OnPlayerEnterButtonArea(playerid, buttonid)
{
new defenceid = def_ButtonDefence[buttonid];
@Southclaws
Southclaws / modhs.core.cpp
Created April 7, 2014 15:51
Basic modular house script
/*
modhs - Modular House Script
modhs.core
Creates, destroys and offers interfacing functions for houses.
By Southclaw
*/
@Southclaws
Southclaws / gist:10186150
Created April 8, 2014 20:26
Infinite ammo / No-reload cheat detection
#define FILTERSCRIPT
#include <a_samp>
#include <ZCMD>
static
WeaponMagSizes[17] =
{
// Pistols
@Southclaws
Southclaws / gist:10186202
Created April 8, 2014 20:27
Increased fire rate cheat detection
#define FILTERSCRIPT
#include <a_samp>
#include <ZCMD>
static
WeaponShotIntervals[17] =
{
// Pistols
@Southclaws
Southclaws / heatmap.js
Created May 20, 2014 15:03
Generates a heatmap from coordinates loaded from "coords-list.txt".
var heatmap = require('heatmap');
var fs = require('fs');
var heat = heatmap(6000, 6000, { radius : 30 });
fs.readFile('coords-list.txt', 'utf8', function(error, data)
{
var arr = data.split("\r\n");
for (var i = 0; i < arr.length; i++)
@Southclaws
Southclaws / markdown-to-bbcode.js
Last active April 25, 2017 23:35
Very basic converter just for personal use since I generally write documentation in Markdown and converting to BBCode for SA:MP forums is pretty annoying.
var fs = require('fs');
var util = require('util');
var
regexHeader1 = new RegExp('^# (.*)'),
replcHeader1 = ['[COLOR="FF4700"][SIZE="7"][B]', '[/B][/SIZE][/COLOR]'],
regexHeader2 = new RegExp('^## (.*)'),
replcHeader2 = ['[COLOR="RoyalBlue"][SIZE="6"][B]', '[/B][/SIZE][/COLOR]'],