- client: the game server
- server: the admin panel
- All integers are little-endian, all strings are null-terminated
- Enums are shown in light blue, responses are in light pink, records are in light purple
- Fields with asterik* are always present, if not present, it may not be sent
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default class BufferReader { | |
#buffer: Buffer | |
#offset: number | |
#length = 0 | |
/// Yields BufferReaders, splitting when it hits newline | |
static *getPackets(data: Buffer) { | |
let reader = new BufferReader(data) | |
yield reader | |
// while(reader.nextBuffer != null) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[macro_export] | |
/// Runs your code after Duration has passed | |
/// # Examples | |
/// ``` | |
/// timeout!(Duration::from_seconds(15), { | |
/// println!("Shutting down now...") | |
/// }); | |
/// ``` | |
/// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void DrawBoundingBoxFromCenter(Vector3 center, Vector3 size, Color color) | |
{ | |
Vector3 cornerA = new Vector3(center.X - size.X, center.Y - size.Y, center.Z + size.Z); | |
Vector3 cornerB = new Vector3(center.X + size.X, center.Y - size.Y, center.Z + size.Z); | |
Vector3 cornerC = new Vector3(center.X + size.X, center.Y + size.Y, center.Z + size.Z); | |
Vector3 cornerD = new Vector3(center.X - size.X, center.Y + size.Y, center.Z + size.Z); | |
DrawLine(cornerA, cornerB, color); | |
DrawLine(cornerB, cornerC, color); | |
DrawLine(cornerC, cornerD, color); | |
DrawLine(cornerD, cornerA, color); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// The format version. Script only checks the last piece (the 1.3.1) | |
"version": "Jackz Custom Vehicle 1.3.1", | |
"created": 1661726534, // Unix timestamp when the vehicle was created. Optional | |
"name": "MyVehicle", // A name for the vehicle, used for when importing into the editor. Optional | |
"author": null, // An author name credited for making vehicle. Optional | |
"blipIcon": 252, // The blip id to show. See https://docs.fivem.net/docs/game-references/blips/ | |
"spawnLocation": { x = 0, y = 0, z = 0 }, // The spawn location of the vehicle. Optional, null will disable | |
"allowPlayerSpawning": false // Default is false, allows other players to use 'spawnbuild name' command | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma semicolon 1 | |
#pragma newdecls required | |
#include <sourcemod> | |
#include <sdktools> | |
// #include <l4d2_behavior> | |
#include <actions> | |
Handle g_hWitchAttack; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const header = [ | |
`import SectionNode from '@/components/sections/SectionNode.vue'` | |
] | |
const exported = { | |
name: "SectionNode", | |
props: { | |
node: Object | |
}, | |
methods: { | |
gotoHeader() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"EntityConfig" | |
{ | |
"c8m3_sewers" | |
{ | |
"ents" | |
{ | |
"A" | |
{ | |
"origin" "13265.965820 8547.057617 -250.7" | |
"type" "env_physics_blocker" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function GetEndCoord(deg, start, range) | |
local rad_x = deg['x'] * 0.0174532924 | |
local rad_z = deg['z'] * 0.0174532924 | |
return { | |
x = range * (-math.sin(rad_z) * math.cos(rad_x)) + start.x, | |
y = range * (math.cos(rad_z) * math.cos(rad_x)) + start.y, | |
z = range * math.sin(rad_x) + start.z | |
} | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use mlua::prelude::*; | |
use std::fs::File; | |
use std::io::BufReader; | |
use rodio::{Decoder, OutputStream, Sink}; | |
use std::time::Duration; | |
use futures_timer::Delay; | |
async fn play_local_file(lua: &Lua, (filepath, volume, duration): (String, f32, u64)) -> LuaResult<()> { | |
let (_stream, stream_handle) = OutputStream::try_default().unwrap(); | |
let sink = Sink::try_new(&stream_handle).unwrap(); |
NewerOlder