ScriptHookVPy – Python Scripting for GTA V V1.01

ScriptHookVPy - Python Scripting for GTA V 1.0

I was inspired by ScriptHookVDotNet, so I decided to create ScriptHookVPy — a Python scripting runtime for GTA V!

Now you can write mods in Python with full access to all native functions.

Features:
🐍 Write mods in Python — no C++ or C# needed!
📦 All natives included — PLAYER, VEHICLE, PED, WEAPON, ENTITY, HUD and all other namespaces
🔄 Auto-load scripts — just drop .py files into pythons/ folder
📝 Logging system — check ScriptHookVPy.log for errors and debug info
⚡ Easy syntax — natives.PLAYER.PLAYER_PED_ID() just like ScriptHookVDotNet style

Installation:
Install ScriptHookV
Copy ScriptHookVPy.asi to your GTA V folder
Copy python311.dll to your GTA V folder
Create pythons/ folder in GTA V directory
Drop your .py scripts into pythons/ folder
Play!

Requirements:
ScriptHookV
Python 3.11 Runtime (python311.dll included)

Example Script:

pythons/test.py:

import natives

def update():
player_id = natives.PLAYER.PLAYER_ID()

if natives.PLAYER.IS_PLAYER_PLAYING(player_id):
natives.PLAYER.SET_PLAYER_WANTED_LEVEL(player_id, 5, False)
natives.PLAYER.SET_PLAYER_WANTED_LEVEL_NOW(player_id, False)

natives.BUILTIN.WAIT(1000)

More Examples:

Spawn Vehicle:

import natives

def update():
player_id = natives.PLAYER.PLAYER_ID()

if natives.PLAYER.IS_PLAYER_PLAYING(player_id):
player_ped = natives.PLAYER.PLAYER_PED_ID()
coords = natives.ENTITY.GET_ENTITY_COORDS(player_ped, True)

model = natives.MISC.GET_HASH_KEY(“adder”)
natives.STREAMING.REQUEST_MODEL(model)

if natives.STREAMING.HAS_MODEL_LOADED(model):
natives.VEHICLE.CREATE_VEHICLE(model, coords.x, coords.y + 5.0, coords.z, 0.0, True, False, False)
natives.BUILTIN.WAIT(5000)

natives.BUILTIN.WAIT(0)

God Mode:

import natives

def update():
player_id = natives.PLAYER.PLAYER_ID()

if natives.PLAYER.IS_PLAYER_PLAYING(player_id):
player_ped = natives.PLAYER.PLAYER_PED_ID()
natives.PLAYER.SET_PLAYER_INVINCIBLE(player_id, True)
natives.ENTITY.SET_ENTITY_HEALTH(player_ped, 200, 0, 0)

natives.BUILTIN.WAIT(1000)

Teleport:

import natives

def teleport(x, y, z):
player_ped = natives.PLAYER.PLAYER_PED_ID()
natives.ENTITY.SET_ENTITY_COORDS(player_ped, x, y, z, False, False, False, True)

def update():
natives.BUILTIN.WAIT(0)

Script Structure:

import natives

def update():
# Called every frame
# Your code here
natives.BUILTIN.WAIT(0)

Available Namespaces:

natives.PLAYER — Player functions
natives.PED — Ped functions
natives.VEHICLE — Vehicle functions
natives.ENTITY — Entity functions
natives.WEAPON — Weapon functions
natives.HUD — HUD/UI functions
natives.STREAMING — Model streaming
natives.MISC — Miscellaneous functions
natives.BUILTIN — WAIT and core functions
And 50+ more namespaces!

Troubleshooting:

Check ScriptHookVPy.log in your GTA V folder for errors:

ScriptHookVPy initialized
test.py initialized
mymod.py initialized
broken.py error: SyntaxError: invalid syntax

Changelog:
Version 1.01 – Critical Bug Fix & Auto-Install

🙏 Apology

I’ve read all the comments and want to sincerely apologize! Version 1.00 worked on my machine, so I didn’t realize there was a critical crash issue affecting most users. The problem was that the standard python311.dll has dependencies that conflict with GTA V.

✅ What’s Fixed

FIXED: Game crash on startup – Now uses Python Embedded instead of standard Python

FIXED: DLL dependency conflicts – All required DLLs are now properly isolated

FIXED: “KERNELBASE.dll exception” – The main crash issue is resolved

NEW: Automatic Python download – No manual file copying needed!

🆕 New Features

Auto-installer – First launch automatically downloads Python 3.11.9 Embedded

No manual setup – Just drop the .asi file and run!

Better logging – More detailed error messages in ScriptHookVPy.log

Smarter file detection – Checks for all required files before starting

Credits:

GamerGy
Alexander Blade — ScriptHookV
ScriptHookVDotNet Team — Inspiration
pybind11 — Python/C++ bindings

Download mod

FileFile size
zip ScriptHookVPy7 MB

Leave a Reply

Your email address will not be published. Required fields are marked *