I suspect tuning is the same as extras (could be wrong) then this might help https://forums.gta5-mods.com/topic/19786/tutorial-how-to-make-specific-vehicle-extras-appear-on-a-vehicle-every-spawn
dimedius
View profile on GTA5-Mods.com »
Posts made by dimedius
-
RE: Vehicle spawning with specific tuningparts
-
RE: How to use CAM::SHAKE_GAMEPLAY_CAM
I may be completely wrong (and somebody feel free to correct me) but from what I was looking up (at least for .net) edits to the default game cam is pretty limited. One would need to create a new gameplay cam and then make edits that way. I imagine if you wanted to keep the cam similar to the default gameplay cam then you would need to recreate all of that as well.
I was looking at editing some explosion things a few weeks back and gave up, seemed a bit laborious at least based on my findings.
-
RE: Question about peds and groups...
Thanks, @mcal9909, you're one of a few people I've come across that have been extremely helpful! I'm mostly interested in that first bit. I have the second part setup but it has some weirdness like they split up sometimes, one gets into a gunfight, the other casually strolls in the opposite direction.
Edit: Oh will the created group require a leader ?
-
Question about peds and groups...
How does grouping work in vanilla story mode? I'm looking to spawn some enemy peds and have them stick together, will this be what I need to look into or does grouping do something else entirely?
Is there some c# references or samples (mods) that already do this?
-
RE: New small project, feedback welcomed!
@Jitnaught & @mcal9909 thanks again for your feedback!
Definitely will try those and provide results, though that might be later in the week or weekend.
@mcal9909 thanks for looking into that other option! I'll be happy to try it out and let you know how it goes.
-
RE: New small project, feedback welcomed!
Alright, so this is the latest bit of code for v1.0.3 for anyone interested. I tried some different approaches provided but either I'm still too green or something wasn't working right. I believe this is a good mix of stability, performance and gameplay.
using System; using System.IO; using System.Collections.Generic; using System.Linq; using GTA; using GTA.Native; namespace postsOfSteel { public class Main : Script { List<int> propHashes = File.ReadAllLines(@"scripts/postsOfSteel.ini").Select(int.Parse).ToList(); public Main() { Interval = 2500; Tick += OnTick; } private void OnTick(object sender, EventArgs e) { Ped playerPed = Game.Player.Character; Prop[] nearbyProps = World.GetNearbyProps(playerPed.Position, 100f); foreach (int prophashes in propHashes) { foreach (Prop prop in nearbyProps) { if (prophashes == prop.Model) { if (prop.IsPositionFrozen == false) { prop.IsPositionFrozen = true; } } } } } } }
Sorry @mcal9909 , I just couldn't get the .where to work with the array and when I changed it to IEnumerable<Prop> it couldn't compare the iterator with an int (like I said, I'm still green so maybe it was an easy fix I couln't find).
-
RE: Needing help on a tiny script to open barrier arm gates.
Thanks!
I was using the native function call in one of my other scripts and it seems it can be a burden performance wise. Like for this mod, its pretty light weight but in my other one it references way more objects.
Right now I've moved to using the hashes straight up instead of trying to convert them (as suggested). Just wanting clarification on whats better suited for the scripts.
-
RE: New small project, feedback welcomed!
Damn thanks! This is real solid, especially since a user said the first version became unstable and crashed. So anything I can do to help increase stability is going to be awesome. Pretty quiet day today so I'll probably look at adding that.
-
RE: New small project, feedback welcomed!
Updated code:
using System; using GTA; using GTA.Native; namespace postsOfSteel { public class Main : Script { public Main() { Tick += OnTick; } private void OnTick(object sender, EventArgs e) { Ped playerPed = Game.Player.Character; Ped[] nearbyPeds = World.GetNearbyPeds(playerPed.Position, 75f); foreach (var pedestrian in nearbyPeds) { Prop[] nearbyProp = World.GetNearbyProps(playerPed.Position, 10f, -365135956, 589548997, 267702115, 1043035044, -753093121, -1059778192, -1529663453, -655644382, -1114695146, 431612653, 681787797, 326972916, -1454378608, -614573584, -306910109, 1821241621, 1847069612, 865627822, -1063472968, -1684988513, 1327054116, 1021745343, 729253480, -1161709063, 862871082, 1393636838, -1222468156, -805588751, 1380570124, -259356231); foreach (var props in nearbyProp) { float dirDist_Player = World.GetDistance(playerPed.Position, props.Position); float dirDist_Ped = World.GetDistance(pedestrian.Position, props.Position); if (playerPed.IsInVehicle() && pedestrian.IsInVehicle() || playerPed.IsInVehicle() && pedestrian.SeatIndex == null) { if (dirDist_Player <= 8f || dirDist_Ped <= 8f) { if (props.Exists()) { Function.Call(Hash.FREEZE_ENTITY_POSITION, props, true); } } } } } } } }
@mcal9909 How would I go about storing that or checking that (mostly storing). I was under the impression that the object is temp set to freeze until the next tick based on the distance and the array would empty.
-
RE: New small project, feedback welcomed!
Good idea. I'll look into implementing that when I can. Appreciate the feedback!