Hi all,
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.
Thanks.
Hi all,
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.
Thanks.
Update: I got the cars to spawn via a list but they all spawn at once. Is there a way to make a random one spawn instead?
Hi All,
I have looked many places but can't find a hacking minigame anyway. Not to bothered on what one but is there any open source files out there or any who can let me know how?
Any help would be great.
Thanks.
Hi All,
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?
thanks.
@transport It is the specs of your PC so the CPU, GPU etc.
@Jitnaught Not to worry fixed it, thanks.
@Jitnaught I have given the code a try, however, it didn't work. I am still stuck in the same case. Is there anything else that could work?
@Jitnaught Oh, OK. Thanks. I have added that to my using part and ill give the code you sent a go. Thanks a tonne.
@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?
Thanks.
Hi,
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.
Thanks.
@JohnFromGWN Yes, after trying it myself this morning I has the same issue. I think I have found an alternative way. Just hope it works properly.
@JohnFromGWN Thanks a tonne. I'll have a look at that now.
@JohnFromGWN OK, thanks for the feedback. I will have a look at this link now and see if I can find anything lol.
@JohnFromGWN Ah OK, I know how I can use a ped that I have spawned but I wondered how I can delete a ped spawned by the game in this case a shopkeeper and then replace it with one that I can spawn in its place.
Hi,
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.
Thanks.
@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?
@AlteredCarbonate Thanks for the feedback. I have now figured it out.
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)
at SHVDN.Script.MainLoop()
[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.
Hi all,
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.
Thanks.
@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, got it. Ill give that a go now. Thanks for the help.
@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.
@mcal9909 OK, thanks. I will give that a go as that makes much sense to me. Thank you for your help.