Reply To: Mafia 3 Modding (Mega Thread)

Download Mods for the Mafia Games Forums Mod Creation Mafia 3 Modding (Mega Thread) Reply To: Mafia 3 Modding (Mega Thread)


I want to spawn Vito near the player.
In Mafia 2, you could do this:

Vito = game.entitywrapper:GetEntityByName("Vito")

In M3, this does not work, although function GetEntityByName is present:

Is there any idea how this can be done?


P.S. Error description in ScriptHook.log:

Error loading Lua code into buffer. Error -100
test:2: attempt to index a nil value
stack traceback:
test:2: in function ‘(main chunk)’
Trying to execute: Vito = game.entitywrapper:GetEntityByName(“Vito”)