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>
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>