Hello members. I am having issues getting the following function/Event to trigger in my program. Here is the list of commands that am using:
local ped = 1
fighterPed = CreatePed(
-- pedType -- Unused --[[ integer ]],
pedtypes,
-- modelHash -- Model of the ped to spawn --[[ Hash ]],
GetHashKey(model),
-- x coordinates --[[ number ]],
posx,
-- y coordinates --[[ number ]],
posy,
-- z coordinates --[[ number ]],
posz,
-- heading -- heading to face towards, in degrees --[[ number ]],
heading,
-- isNetwork -- affects duplicate peds. Online dups Offline no dupes --[[ boolean ]],
false,
-- bScriptHostPed -- whether to register the ped as pinned to the script host in the R* network model --[[ boolean ]]
false
)
TaskCombatPed(fighterPed, ped, 0, 16)
What happens is that the NPC drops in fine. But it never moves or attempts to attack the player. I thought that it may be an issue with client.lua. vs server.lua. So I set up an event handler for the server side using server.lua. Got the same result. Nothing… Now when I tried other client side Tasks* functions like hands up. It works fine. See that command below.
TaskHandsUp(fighterPed, 10000, ped, -1, 1000)