Does anyone know how to make a timer bar in the corner of the screen with a countdown? I am trying to make a timer for an indication of when the cops will get to where you are.
Any help would be great.
I am trying to make a script were I talk to someone and they send me to go after a vehicle and bring it back. How can I make It so the vehicle is random out of the ones I want?
Say I wanted a choice of T20, Adder, Tempesta and Zentorno, how can I make sure a random one of those spawn?
@transport It is the specs of your PC so the CPU, GPU etc.
@Jitnaught Ah, OK. I have all the peds in a List<Ped> already, how would I use a LINQ? I have never had to use one of these before. I understand the code and I can put that into my .cs but I am not sure on how to use a LINQ on my List<Ped>. Could you please show me or tell me how to do so?
I have been trying to make a code so that when I all killed all 13 of spawned in peds it will take me onto the next stage of the code. I made this if (Lost1.IsDead && Lost2.IsDead && Lost3.IsDead && Lost4.IsDead && Lost5.IsDead && Lost6.IsDead && Lost7.IsDead && Lost8.IsDead && Lost9.IsDead && Lost10.IsDead && Lost11.IsDead && Lost12.IsDead && Lost13.IsDead)
but as you can see it is really long and it does not move me onto the next part.
Any help would be great.
I am trying to make a script where I need to intimidate a shop keeper for a code but I don't know how I can delete the current shopkeeper and replace it for one I manually put in for my intimidation part to work. Does anyone know how I can delete and specific ped and replace it with another model that I have in my code.
Any would would be great.
@transport Hmmm OK, I'm not to sure maybe try verifying game file if you are using steam and if not then maybe try reinstalling the game. If that does not work then I have no clue. What hardware do you have?
Does anyone know why when I put my script into the scripts folder and load the game it isn't there and I have to reload scripts in-game to get it to appear?
[21:25:28] [INFO] Started script Shop_Robbery.Main.
[21:25:31] [ERROR] Caught fatal unhandled exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Shop_Robbery.Main.onTick(Object sender, EventArgs e) in C:\Scripts\Shop Robbery\Shop Robbery\shoprobbery.cs:line 47
at System.EventHandler.Invoke(Object sender, EventArgs e)
[21:25:31] [ERROR] The exception was thrown while executing the script Shop_Robbery.Main.
[21:25:31] [WARNING] Aborted script Shop_Robbery.Main.
This is the mission section from the SHVDN2.log if it helps.
I have recently made an edit to a script and I got it so I spawn in 2 cop cars and 4 cops in them (2 in each), however, it all works fine but when the players wanted level equals 0 they keep chasing the player as if they are still wanted. I have tried many functions and looking into copCar1.xxxx but i can't find anything that can help.
Anyone who may know of a way to fix this or knows of a function I missed if you could let me know that would be great.
@transport Ah OK, I'm not sure then. I make sure:
If none of that works then maybe try looking on YT or I know there was a couple times reinstalling windows fixed it for me but that is a long and awkward process.
@mcal9909 OK. I only want the marker appear in the task it is in so it appears after I have spoken to Lester and then it disappears when the guard is in my pedgroup. Will that code still be good?
I updated the current marker code to this:
if (!missionVehicle.IsInRangeOf(guardMarkerPos, 3.5f)) World.DrawMarker(MarkerType.VerticalCylinder, new Vector3(guardMarkerPos.X, guardMarkerPos.Y, guardMarkerPos.Z - 0.5f), Vector3.Zero, Vector3.Zero, new Vector3(1.8f, 1.8f, 0.9f), Color.FromArgb(0, 153, 255));
So, if the mission car is more than 3.5f away from the marker pos then it should be there.
Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.