Mafia 3 ScriptHook

Mods chevron_right chevron_right Mafia 3 ScriptHook
  • descriptionDescription

    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!
  • speaker_notesInstallation

    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.

  • event_noteChangelog

    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

  • 20 Ratings

  • UploaderBarzakh
  • ModderBarzakh
  • Mod Version1.1
  • Supported Game Version
  • Views62511
  • Downloads27798
  • Size160.69 kB
  • UpdatedOct 12, 2016
  • CategoryTools (Mafia 3)
  • Tags
  • Please register or login to download this mod

  • Report