Your web browser, Internet Explorer is out of date.

Please download one of these up-to-date, free and excellent browsers:

Microsoft Edge, Mozilla Firefox, Google Chrome or Brave Browser

Login / Register

Mafia 3 ScriptHook

Script Hook

Lua and Library Scripthook for Mafia 3 allowing you to run your own code in Mafia 3. Simply create a lua script or use the ExampleDLL to create your plugin and start creating yor mod. The Library Scripthook features a hooking library to find pattern, patch function calls/jumps with your own, overwriting opcodes/functions etc.

List of all available commands follows in the next few hours, meanwhile you can tryout Mafia2's scripting commands (which can be found here), as they don't have really changed.

Mafia 3 Script Hook is completly open source and can be found at

If you want to reload Lua scripts while being in the game, simply press F1 and all Lua scripts in side the scripts/ folder will reload.

Scripting Documentation

A list of functions; parameters; strings can be found here:!VscigCQQ!yl3PBpGpZ075v6K5x6PICA

If you need help or are experiencing troubles, don't hesitate to ask for help:

ScriptHook implemented functions:

printToLog("YourLogfile", "String"); // e.g. printToLog("Test.log", "Test");
bindKey("k", "ContentToExecute") // e.g. bindKey("k", "printToLog('Test.log', 'test')");
unbindKey("k"); // (removes all bindings of key "k", even in other scripts)
setTimeout("5000", "ContentToExecute") // e.g.  setTimeout("5000",  "printToLog('Test.log', 'test')"); (5000 = 5000ms)

An example file for scripting can be found here:

Please be careful with pressing keys, spaming keys / executing the same things too often in a short time period can cause the game to crash!

1. Download .ZIP

2. Extract the .ZIP content into Mafia III directory so the structure looks like this

|- mafia3.exe

|- M3ScriptHookLauncher.exe

|- M3ScriptHook.dll

3. Run M3ScriptHookLauncher.exe once the game has started.

ScriptHook Version 1.1, supports now the following functions

printToLog("YourLogfile", "String"); // e.g. printToLog("Test.log", "Test");
bindKey("k", "ContentToExecute") // e.g. bindKey("k", "printToLog('Test.log', 'test')");
setTimeout("5000", "ContentToExecute") // e.g.  setTimeout("5000",  "printToLog('Test.log', 'test')");

-Implementation of Lua error logs (placed in ScriptHook.log)

Error loading Lua code into buffer. Error -100
scripts/dev.lua:11: = expected near 'setVehicleData'
stack traceback:
 [C]: in function 'assert'
 test:1: in function 'dofile'
 test:1: in function '(main chunk)'
-Overall stability improved


Leave a Reply

  1. psrkallez06 says:

    Everytime i try to open it the game just closes.. I have it running as admin and everything with win 7 comp mode. Still doesn’t work. Please help?

  • 1uploads
File size
160.69 kB
October 12, 2016