some1 need to get that moncler bubble zip up poppin its gettin chilly
dev614
View profile on GTA5-Mods.com »
Posts made by dev614
-
RE: GTA V Streetwear Thread
-
RE: How to get peds within a 5f radius without picking up playerPed?
@Jitnaught Yessir, here's the codes:
Working code with pedGroup[0]: https://pastebin.com/q3MTx3JS
Nonworking code with loop: https://pastebin.com/yX7DSqpT
Maybe since Squad1Leader is declared null, the other functions (such as the order functions) can't pick it up, so the "Squad1Leader" variable isn't used for the UI or the orders functions? I don't know, just taking a shot in the dark.
-
RE: How to get peds within a 5f radius without picking up playerPed?
@Jitnaught Apparently the loop. When using pedGroup[0] it's working as expected and adding the Ped in slot [0] in pedGroup to Squad1Group and making them the leader, thus being able to be commanded. When using your loop, it seems to make the ped join the group (they stop and stand still) but they don't appear on the Squad UI and I cannot command them, meaning they're not the leader.
-
RE: How to get peds within a 5f radius without picking up playerPed?
@Jitnaught Using that code seems to add the member to the group, but doesn't work how the pedGroup[0] was working as far as making them the leader and whatnot, I'm not sure why? I'm going to post the entire code and if you're willing, if you could take a look and see what changes I may have to make I'd be super appreciative. If not it's totally fine, you shouldn't have to hold my hand through this, but I'm just now learning to code so it's amateur hour
Here's the code for the recruit function: https://pastebin.com/XtUR5VYy
-
RE: How to get peds within a 5f radius without picking up playerPed?
@Jitnaught Hey, could you assist me in setting up that loop to check for the closest ped? I need the ped to be named "Squad1Leader", am I setting this up right?
float maxDistance = 25f; pedsGroup = World.GetNearbyPeds(player.Character, maxDistance); Ped ped = null; float lastDistance = maxDistance; foreach (Ped Squad1Leader in pedsGroup) { float distance = Squad1Leader.Position.DistanceTo(player.Character.Position); if (distance > lastDistance) { ped = Squad1Leader; lastDistance = distance; } } if (Squad1Leader != null) {
-
RE: How do you make a ped never attack the player?
@eshenk I think he’s referring to another post of his I commented on referring to adding Peds to relationship groups and I said you use peds.ymt to do so. The broken English makes it a little hard to decode but I think that’s the gist lmao
-
RE: How to get peds within a 5f radius without picking up playerPed?
@stillhere Unfortunately Eddlm's a bit caught up with real life things, and no they do not. I tried to search the code for the portion that controls the squads spawning, yet it doesn't seem to contain anything special. I think since the created ped had no tasks to begin with, it just stands still regardless - so after being tasked, it returns to its default state - standing still. That's just whats makes me feel good about myself though, I haven't actually tried to look into it because it's beyond my comprehension tbh. I'll give that link a go and continue to take shots in the dark hoping to make something happen!
Here's the code used to create a squad: https://pastebin.com/34MXYjmv
-
RE: How to get peds within a 5f radius without picking up playerPed?
@stillhere That would require me picking apart Eddlm's order functions and trying to redo all the tasks, which from the looks of it isn't possible because to add them to the sequence you would have to use the sequence.AddTask method, which doesn't use all of the task functions in the order function.
Would there be a way to check if a ped has completed a task, and if so, to stand still afterwards? Something to run in an onTick?
-
RE: How to get peds within a 5f radius without picking up playerPed?
@stillhere said in How to get peds within a 5f radius without picking up playerPed?:
recruit.Tasks.StandStill(-1);
That works when recruiting the ped, but after ordering them to run to a location, after completing the task the ped begins to wander again.
-
RE: How to get peds within a 5f radius without picking up playerPed?
@Jitnaught You're awesome, thank you so much!
I'm working on adding a "recruit peds" feature to Eddlms Bodyguard Squads script and it's nearly complete. The only thing that I can't seem to figure out is how to get recruited peds to stand still until tasking/after completing task.
Would you happen to know how to make a ped (in its own group) stand still until being tasked? And then after completing the task, stand still until being tasked again?
Here's what I have so far:
pedsGroup = World.GetNearbyPeds(player.Character, 5f); Squad1Leader = pedsGroup[0]; Squad1Group = Function.Call<int>(Hash.CREATE_GROUP); PreparePed(Squad1Leader, MainWeaponSquad1, SecondaryWeaponSquad1); Function.Call(GTA.Native.Hash.SET_GROUP_FORMATION, Squad1Group, 1); Function.Call(GTA.Native.Hash.SET_GROUP_FORMATION_SPACING, Squad1Group, 1.0f, 1.0f, 1.0f); Function.Call(Hash.REMOVE_PED_FROM_GROUP, Squad1Leader); if (Squad1Followplayer.Checked) { Squad1Followplayer.Checked = false; } if (Squad1.Count > 0) { Function.Call(Hash.SET_PED_AS_GROUP_MEMBER, Squad1Leader, Squad1Group); } else { Function.Call(Hash.SET_PED_AS_GROUP_LEADER, Squad1Leader, Squad1Group); } Squad1.Add(Squad1Leader); Function.Call(Hash.SET_PED_NEVER_LEAVES_GROUP, Squad1Leader, true); foreach (Ped recruit in Squad1) { recruit.RelationshipGroup = Squad1RelationshipGroup; Function.Call(Hash.SET_PED_SHOOT_RATE, recruit, 1000); Function.Call(Hash.SET_PED_COMBAT_ABILITY, recruit, 100); recruit.AddBlip(); recruit.CurrentBlip.Color = BlipColor.Blue; recruit.CurrentBlip.Scale = 0.7f; SetBlipName(recruit.CurrentBlip, "Squad Member"); PreparePed(recruit, MainWeaponSquad1, SecondaryWeaponSquad1); recruit.AlwaysKeepTask = true; }