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?
Posts made by MurkyMamba
-
RE: How to make random car from selection spawn
-
Hacking Minigame.
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.
-
How to make random car from selection spawn
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.
-
RE: Game is lagging and doesn't have the fps it had before, I hate this error and want to get it fixed.
@transport It is the specs of your PC so the CPU, GPU etc.
-
RE: Ped.isdead issue [C#]
@Jitnaught Not to worry fixed it, thanks.
-
RE: Ped.isdead issue [C#]
@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?
-
RE: Ped.isdead issue [C#]
@Jitnaught Oh, OK. Thanks. I have added that to my using part and ill give the code you sent a go. Thanks a tonne.
-
RE: Ped.isdead issue [C#]
@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.
-
Ped.isdead issue [C#]
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.
-
RE: [C#] How to change ped model?
@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.
-
RE: [C#] How to change ped model?
@JohnFromGWN Thanks a tonne. I'll have a look at that now.
-
RE: [C#] How to change ped model?
@JohnFromGWN OK, thanks for the feedback. I will have a look at this link now and see if I can find anything lol.
-
RE: [C#] How to change ped model?
@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.
-
[C#] How to change ped model?
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.
-
RE: Game is lagging and doesn't have the fps it had before, I hate this error and want to get it fixed.
@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?
-
RE: Script won't load on start
@AlteredCarbonate Thanks for the feedback. I have now figured it out.
-
Script won't load on start
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.
-
Get spawned cops to stop chasing player.
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.
-
RE: Game is lagging and doesn't have the fps it had before, I hate this error and want to get it fixed.
@transport Ah OK, I'm not sure then. I make sure:
- There are no unneeded scripts as they can slow the game down.
- There isn't malware or anything on the PC ofcourse.
- If you have graphic mods then try without them.
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.
-
RE: Marker issues.
@mcal9909 OK, got it. Ill give that a go now. Thanks for the help.
-
RE: Marker issues.
@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.
-
RE: Marker issues.
@mcal9909 OK, thanks. I will give that a go as that makes much sense to me. Thank you for your help.
-
RE: Marker issues.
@mcal9909 OK, thanks. Here is the rest of the code as you said it would help. Mission tab (https://pastebin.com/tXXD9gr6) Processing tab (https://pastebin.com/EZCP01uh). Also, thanks for letting me know how to make it neater. Just so you know, the code is not finished so there may be gaps in places.
Thanks for the help.
-
RE: Game is lagging and doesn't have the fps it had before, I hate this error and want to get it fixed.
@transport Make sure you are running the game on a HDD at least. A SSD if you have one. Externa; HDDs are not the best for running games as the read/write rates. If it is on a HDD or SSD then I am not sure how to solve this issue.