Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Kmeto

1
Mafia II mods / LUA script (Entity)
February 18, 2013, 05:07:27 PM
Hello. I've got problem. I want to make LUA script to add NPCs, but it looks like it's not working. Can somebody please help?


 




Here's my script (to add Bomber in front of Vito's Villa):







<pre class="ipsCode">game.sds:ActivateStreamMapLine("fr_bomber_m01_load")



game.entitywrapper:GetEntityByName("enemy1"):Activate()

game.entitywrapper:GetEntityByName("enemy1"):SetPos(Math:newVector( -1315, 1005,-19))

game.entitywrapper:GetEntityByName("enemy1"):SetDir(Math:newVector( 0,-1,0))

game.entitywrapper:GetEntityByName("enemy1"):InventoryAddWeapon(5,92)

game.entitywrapper:GetEntityByName("enemy1"):Attack(game.game:GetActivePlayer())</pre>