Skip to content

Instantly share code, notes, and snippets.

View BigETI's full-sized avatar
🤣
When GitHub stories?

Ethem Kurt BigETI

🤣
When GitHub stories?
View GitHub Profile
@BigETI
BigETI / create_empty_unity_package.cpp
Created October 28, 2020 17:31
Creates an empty Unity project. Loads very quickly!
#include <iostream>
#include <filesystem>
#include <fstream>
static void WriteToFile(const std::filesystem::path& path, const std::string& contents)
{
std::ofstream ofs(path.string());
if (ofs.is_open())
{
ofs << contents;
@BigETI
BigETI / keys.pwn
Created October 27, 2020 18:25
Helper function to check key states in PAWN
bool:AreKeysDown(keys, oldKeys, newKeys)
{
return ((oldKeys & keys) != keys) && ((newKeys & keys) == keys);
}
bool:AreKeysUp(keys, oldKeys, newKeys)
{
return ((oldKeys & keys) == keys) && ((newKeys & keys) != keys)
}
@BigETI
BigETI / Plane.cs
Created August 27, 2020 18:56
An class that allows generating plane meshes.
using System;
using System.Threading.Tasks;
using UnityEngine;
/// <summary>
/// Plane class
/// </summary>
public static class Plane
{
/// <summary>
/// <summary>
/// Draw line
/// </summary>
/// <param name="from">From in texture coordinates</param>
/// <param name="to">To in texture coordinates</param>
/// <param name="brushSize">Brush size</param>
/// <param name="color">Color</param>
/// <param name="isForeignDrawCommand">Is foreign draw command</param>
public void DrawLine(Vector2 from, Vector2 to, float brushSize, Color32 color, bool isForeignDrawCommand)
{

The SQLite 3 API provides making prepared statements, managing backups, working with shared caches and providing mutexes to implement multi threading. The current implementation at some well known multiplayer mod misses a lot of useful features. So that is why I want propose additional natives for the database API.

  • SQLite:SQLite_Open(const path[], SQLiteOpenMode:openModeFlags):Open a SQLite database with support for file open mode flags and opening databases in a shared cache mode
  • SQLite:SQLite_OpenLegacy(const path[]): This function exists to be compatible with db_open
  • SQLite_Close(SQLite:database): Closes a SQLite database (db_close)
  • SQLite_CloseAll: Closes all SQLite databases
  • SQLite_CreateStatement(SQLite:database, const sql[]): Creates a prepared statement
  • SQLiteStatement:SQLite_CreateStatementThreaded(SQLite:database, const sql[], const callback[]): Creates a prepared statement in another thread
  • `SQLite_DestroyStatement(SQLiteStatement:statement
<?php
//error_reporting(E_ALL);
//ini_set('display_errors', 1);
const SFXFiles =
[
// ['banks' => 7, 'name' => 'FEET'],
// ['banks' => 137, 'name' => 'GENRL'],
// ['banks' => 3, 'name' => 'PAIN_A'],
['banks' => 218, 'name' => 'SCRIPT'],
AA:
Number of banks: 66
ADVERTS:
Number of banks: 69
:
Number of banks: 0
AMBIENCE:
Number of banks: 40
BEATS:
Number of banks: 10
FEET:
Number of banks: 7
FEET bank 0:
Number of audio clips: 9
FEET bank 1:
Number of audio clips: 5
FEET bank 2:
Number of audio clips: 5
FEET bank 3:
Number of audio clips: 5

Community San Andreas Multiplayer Launcher planned features

Core

Internal

  • ASI plugin loader
  • Configuration interface
  • Connection history
  • Module loader
  • Password database interface
This file has been truncated, but you can view the full file.
FEET:
Number of banks: 7
FEET bank 0:
Length: 90998
Offset: 0
Number of audio clips: 9
FEET bank 0 audio 0:
Sample rate: 16000
Sound buffer offset: 0
Loop offset: 4294967295