Skip to content

Instantly share code, notes, and snippets.

@Whitetigerswt
Whitetigerswt / main.cpp
Last active May 26, 2021 04:08
SAMP_AC Install Callback .DLL
#include <windows.h>
#include <stdio.h>
#include <tlhelp32.h>
#include <fstream>
#include "main.h"
int PreInstall(char* installation_folder_name) {
return 0;
}
#include <a_samp>
#include <sscanf2>
#include <sqlitei>
new intRanges[] =
{
0, // 0
0, // 1
0, // 2
0, // 3
@Whitetigerswt
Whitetigerswt / camtest.pwn
Created May 13, 2014 20:44
Demonstrating odd GetPlayerCameraZoom values
// https://www.youtube.com/watch?v=4YnhFq8T6L0
#include <a_samp>
public OnPlayerUpdate(playerid) {
new str[50];
format(str, sizeof(str), "%f %f", GetPlayerCameraZoom(playerid), GetPlayerCameraAspectRatio(playerid));
SendClientMessage(playerid, -1, str);
}
@Whitetigerswt
Whitetigerswt / Addresses.cpp
Created May 17, 2014 01:30
YSF windows server independance
#include "main.h"
#include "Addresses.h"
#ifdef _WIN32
DWORD CAddress::FUNC_Logprintf_03Z = 0x00486CB0;
DWORD CAddress::FUNC_Logprintf_03ZR2_2 = 0x00487310;
#else
DWORD CAddress::FUNC_Logprintf_03Z = 0x080A7440;
DWORD CAddress::FUNC_Logprintf_03ZR2_2 = 0x080A77D0;
#endif
#include "main.h"
int iLastBulletFlood = GetTickCount();
int iLastCrasherActivation = GetTickCount();
void cheat_handle_fakebullets ()
{
traceLastFunc( "cheat_handle_fakebullets()" );
if(g_SAMP == NULL || g_SAMP->iGameState != GAMESTATE_CONNECTED)
public OnPlayerUpdate(playerid)
{
new Float:posX, Float:posY, Float:posZ;
GetPlayerCameraPos(playerid, posX, posY, posZ);
if(!IsPlayerInRangeOfPoint(playerid, 10.0, posX, posY, posZ) && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT && (GetPlayerCameraMode(playerid) == 7 || GetPlayerCameraMode(playerid) == 53)) {
return 0;
}
}
from PIL import Image
import numpy as np
def main():
im = Image.open("image.jpg").convert('LA') #Can be many different formats.
pix = im.load()
#emulate CaffeNet implementation.
brightness -1
mousefix 1
shadows 0
heathaze 0
sound 1
vehiclelighting 1
specularvehicle 1
targetblip 1
clouds 0
flashes 0
;--------------------------------
; Script Definitions
!define APP_NAME "SA-MP Anti-Cheat Client Installer"
!define OUT_DIR "Output"
!define TEMP_INI "$PLUGINSDIR\download.ini"
!define DOWN_INI "$EXEDIR\download.ini"
!define DOWN_LNK "http://whitetigerswt.github.io/SAMP_AC_v2/Releases/sampac-client.exe"
!define HEAD_GET "$PLUGINSDIR\head.txt"
!define FILE_GET "$EXEDIR\sampac-$date2file.exe"
;NSIS Modern User Interface
;Basic Example Script
;Written by Joost Verburg
;--------------------------------
;Include Modern UI
!include "MUI2.nsh"
!include 'nsdialogs.nsh'