Getting Started
Welcome to the N3NY000 Lua API documentation. This API allows you to create custom scripts that extend the functionality of the N3NY000 menu.
Quick Setup
1. Create a new .lua file in C:\N3NYOOO\lua
2. Write your script using the API functions below
3. Save the file and restart the menu
4. Your script will be loaded automatically
Basic Script Structure
-- My First N3NY000 Script
script_name("My First Script")
script_author("Your Name")
script_version("1.0")
-- This function runs when the script loads
function on_load()
log("Script loaded successfully!")
notify("Hello from Lua!", "success")
end
-- This function runs every game frame
function on_tick()
-- Your code here
end
-- Register the script
register_script()
Basic Functions
The message to log to the console
log("This is a debug message")
The notification message to display
Type of notification: "success", "warning", "error", "info"
notify("Script activated!", "success")
notify("Warning: Low health", "warning")
notify("Error occurred", "error")
Time to sleep in milliseconds (1000ms = 1 second)
notify("Wait 3 seconds...")
sleep(3000)
notify("Done waiting!")
Player Functions
local health = player.get_health()
log("Current health: " .. health)
Health value to set (0-100)
player.set_health(100)
notify("Health restored!", "success")
X coordinate
Y coordinate
Z coordinate (height)
-- Teleport to Fort Zancudo
player.teleport(-2360.0, 3249.0, 92.9)
notify("Teleported to Fort Zancudo", "info")
Vehicle Functions
Name of the vehicle model to spawn (e.g., "adder", "t20")
local car = vehicle.spawn("adder")
notify("Vehicle spawned!", "success")
Vehicle handle. If not provided, repairs current vehicle
vehicle.repair()
notify("Vehicle repaired!", "success")
World Functions
Hour (0-23)
Minute (0-59)
world.set_time(12, 0) -- Set to noon
world.set_time(0, 0) -- Set to midnight
Weather type: "clear", "rain", "thunder", "snow", "fog"
world.set_weather("clear")
notify("Weather changed to clear", "info")
UI Functions
Text to display
X position (0.0 to 1.0)
Y position (0.0 to 1.0)
Text size (default: 0.5)
RGBA color {r, g, b, a} (0-255)
ui.draw_text("Hello World!", 0.5, 0.5, 1.0, {255, 255, 255, 255})
Complete Examples
Example Scripts
Here are some complete example scripts to help you get started:
Example 1: Auto Health Regeneration
-- Auto Health Regeneration Script
script_name("Auto Heal")
script_author("N3NY000")
script_version("1.0")
function on_tick()
local health = player.get_health()
-- If health is below 50, heal to 100
if health < 50 then
player.set_health(100)
notify("Health restored!", "success")
sleep(5000) -- Wait 5 seconds before next heal
end
end
register_script()
Example 2: Vehicle Spawner
-- Quick Vehicle Spawner
script_name("Vehicle Spawner")
script_author("N3NY000")
script_version("1.0")
-- List of favorite vehicles
local vehicles = {"adder", "t20", "zentorno", "insurgent"}
local current_index = 1
function on_load()
log("Vehicle Spawner loaded!")
notify("Press [F9] to spawn vehicle", "info")
end
function on_key_press(key)
if key == "F9" then
local car = vehicle.spawn(vehicles[current_index])
notify("Spawned: " .. vehicles[current_index], "success")
-- Move to next vehicle in list
current_index = current_index + 1
if current_index > #vehicles then
current_index = 1
end
end
end
register_script()
Example 3: Teleport Menu
-- Teleport Locations Script
script_name("Teleporter")
script_author("N3NY000")
script_version("1.0")
-- Popular locations
local locations = {
["Airport"] = {-1336.0, -3044.0, 13.9},
["Fort Zancudo"] = {-2360.0, 3249.0, 92.9},
["Mount Chiliad"] = {501.8, 5604.5, 797.9},
["Beach"] = {-1388.0, -1277.0, 4.0}
}
function on_load()
notify("Teleporter loaded! Use menu to teleport", "info")
end
function teleport_to(location_name)
local coords = locations[location_name]
if coords then
player.teleport(coords[1], coords[2], coords[3])
notify("Teleported to " .. location_name, "success")
end
end
register_script()
Important Notes
• Script Location: All scripts must be placed in C:\N3NYOOO\lua
• File Extension: Scripts must have a .lua file extension
• Auto-Loading: Scripts are loaded automatically when the menu starts
• Debugging: Use the log() function to debug your scripts
• Performance: Avoid heavy operations in on_tick() as it runs every frame