MAFINS Posted May 10, 2015 Share Posted May 10, 2015 Simply block non-temporary events for the ped, and clear the flee attributes. TASK_SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(ped, true);SET_PED_FLEE_ATTRIBUTES(ped, 0, 0);SET_PED_COMBAT_ATTRIBUTES(ped, 17, 1);ORSET_BLOCKING_OF_NON_TEMPORARY_EVENTS(ped, 1);SET_PED_FLEE_ATTRIBUTES(ped, 0, 0);SET_PED_COMBAT_ATTRIBUTES(ped, 17, 1); NModds, xktgangx and robban 3 Link to comment Share on other sites More sharing options...
Freakyy Posted May 10, 2015 Share Posted May 10, 2015 Radical. B) Link to comment Share on other sites More sharing options...
Tiryll Posted May 10, 2015 Share Posted May 10, 2015 Nice man. I did try something like this myself, but have to say when I seen freaky's example, it made a lot of sense in how I need to handle things and gives a bit more freedom I think. It's nice to have options Link to comment Share on other sites More sharing options...
wolfokami321 Posted May 10, 2015 Share Posted May 10, 2015 Great now all we need is a script to change everyone into the zombie ped... zombie mod plz Link to comment Share on other sites More sharing options...
xsploit Posted May 11, 2015 Share Posted May 11, 2015 i've been trying to make a zombie mod from the get go...i have the gta4 infection mod but i aint converting that, if someone could help withj entity.creatmodelswap....it could be possible Link to comment Share on other sites More sharing options...
cnelbuendia Posted May 21, 2015 Share Posted May 21, 2015 (edited) It's working for me only for created Peds but not for world existing peds, could you please elaborate on the params? Thank you. Edited May 21, 2015 by cnelbuendia dehan 1 Link to comment Share on other sites More sharing options...
Andross90 Posted May 26, 2015 Share Posted May 26, 2015 I'm having issues with scripting Peds at the moment. In my mod I spawn and add a ped to my group, I have a ped follow me, once I eliminate an enemy, I then set a task for the Ped to go to a specific location. This works fine if I allow the ped to follow while I do the objective, but if I ditch the ped and get too far away from him (the objective is some distance a way and I must travel by vehicle) - after I eliminate the enemy, the ped will just freeze in place and refuse to go to perform the task I set. I know that if you get too far away from peds they may leave your group, but I fixed this by doing: GTA.Native.Function.Call(Hash.SET_GROUP_SEPARATION_RANGE, GTA.Native.Function.Call<int>(Hash.GET_PLAYER_GROUP, Game.Player), 10000000000000.0f); which seems to work as I can drive miles away from him, and then return to him and he will still follow. But if I am far away from him and the script then sets a new task for him, it just doesn't work and he stays frozen in place. Can anyone advise on how to set a task for a ped that is far away from you to go somewhere far away from him? Thanks. Link to comment Share on other sites More sharing options...
dehan Posted June 12, 2015 Share Posted June 12, 2015 It's working for me only for created Peds but not for world existing peds, could you please elaborate on the params? Thank you. Bump, has anyone managed to get existing world peds to not flee? Eg in vehicles and such. Link to comment Share on other sites More sharing options...
DaBOSS54320 Posted June 19, 2015 Share Posted June 19, 2015 I just got peds to not flee when you aim at them with a weapon. It took me trying out each attribute manually lol but oh well, I found it. It's combat attribute 46, it must mean something like "fight to the death" I guess. PED::SET_PED_COMBAT_ATTRIBUTES(ped,46,TRUE); jedijosh920 and dehan 2 Link to comment Share on other sites More sharing options...
nordi Posted July 21, 2015 Share Posted July 21, 2015 It's working for me only for created Peds but not for world existing peds, could you please elaborate on the params? Thank you. Bump, has anyone managed to get existing world peds to not flee? Eg in vehicles and such. Anyone ? Link to comment Share on other sites More sharing options...
whorse Posted October 2, 2015 Share Posted October 2, 2015 It's working for me only for created Peds but not for world existing peds, could you please elaborate on the params? Thank you. Bump, has anyone managed to get existing world peds to not flee? Eg in vehicles and such. Anyone ? Yes, we've been able to do this for a while now. You use either PED::GET_PED_NEARBY_PEDS or - preferably - worldGetAllPeds() to gather all the peds in the game world, then you go through them in a for-loop and set each of them to not flee by using the natives mentioned in this thread: Ped allPeds[1024];int count = worldGetAllPeds(allPeds, 1024);for (int i = 0; i < count; i++){ Ped ped1 = allPeds[i]; if (ENTITY::DOES_ENTITY_EXIST(ped1)) { PED::SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(ped1, TRUE); //the most important one PED::SET_PED_FLEE_ATTRIBUTES(ped1, 0, 0); PED::SET_PED_COMBAT_ATTRIBURES(ped1, 46, TRUE); PED::SET_PED_RELATIONSHIP_GROUP_HASH(ped1, GAMEPLAY::GET_HASH_KEY("cougar")); } } 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