elsewhat Posted August 5, 2017 Share Posted August 5, 2017 Hi, I'm seeing some strange behaviour with AI::TASK_SHOOT_AT_ENTITY if it's called two times for the same ped. The second time it's called, the ped is just standing there and aiming at the target ped. I was able to get it working sometimes by using either WEAPON::SET_PED_INFINITE_AMMO_CLIP or WEAPON::ADD_AMMO_TO_PED and WEAPON::SET_AMMO_IN_CLIP However, even this does not work consistently. WEAPON::GET_AMMO_IN_PED_WEAPON reports -1 (as for all NPCs) and WEAPON::GET_AMMO_IN_CLIP indicates a full clip. I call the native with these parameters. The task is fully completed before being called again AI::TASK_SHOOT_AT_ENTITY(attacker->getPed() , defender->getPed(), -1, GAMEPLAY::GET_HASH_KEY("FIRING_PATTERN_SINGLE_SHOT")); Have also tried: AI::CLEAR_PED_TASKS_IMMEDIATELY Removing the weapon with WEAPON::REMOVE_ALL_PED_WEAPONS before re-adding with WEAPON::GIVE_WEAPON_TO_PED(ped, weaponHash, 1000, 1, 1); Any way around this? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now