Everything posted by ToastinYou
-
Please Help!
Do you have a while loop in your Process ()? To debug I'd use Game.LogTrivial ("Text here e.g. Ped just Created."); Put this after things like new ped/vehicle set spawnpoint etc basically it'll let you know where the code messed up in the Rage Console/log.
-
Game.DisplayHelp(""); Not Working..
Thank you. I did forget to do a few things, one of which was setting paramedics and firefighters persistent, I believe. I'll switch from native to tasks of available, I just find some natives to be more customisable. And so I guess your saying I have a Hide Help in my process? I didn't see it but I'm on my phone right now, I'll look into this tomorrow. Thanks khorio the khallout man :)
-
Game.DisplayHelp(""); Not Working..
My Game.DisplayHelp(""); in this code below is not working. It doesn't pop up or anything. I'm really confused. I have tried removing the Settings.TalkKey part, didn't work. I've tried moving it down to process, didn't work, I'm just really confused. If anyone knows why this is, please let me know - thank you! (It's at the end of OnCalloutAccepted(); [ P.S. I have no errors. ]
-
GTA V Vehicle Model List? [SOLVED]
Wow, didn't even think of those options! Flew right over my head, I guess it's because I use websites to look up animations, ped models, props, weapons, etc. lol Thank you! :)
-
Give a ped a specific model
I'd like to add in a few things here just so you can look back on this when you are further into coding and want to know this and that about spawning Ped's/Vehicle's so you don't have to start a new topic later on, as the answer will be right here :) First, you have your simple spawning of your Ped. //myCopPed1 is the name of the ped you will use throughout your code, I used myCopPed1 as 1) it's a cop, 2) I have another cop Ped which is named myCopPed2. //= new Ped creates the Ped, and then you can sift through the arrow keys up and down to find (Model model, SpawnPoint spawnpoint, float heading); // under Model model you can put whatever model ID you want, so in my case I want a police officer, so I did "s_m_y_cop_01". // I have set my SpawnPoint as SpawnPointmyCopPed1.Position, yours could be called just plain SpawnPoint, but mine is from a more complex callout. // and then, I believe (never used it), float heading is ho high or low the ped is. Generally you would want your Ped at 0.0f unless you have some weird callout that spawns the guy in the air lol (Suicidal Guy Jumped off Building? CALLOUT IDEA! :) ) myCopPed1 = new Ped("s_m_y_cop_01", SpawnPointmyCopPed1.Position, 0.0f); Now, you may be wondering later on.. can I list off a few different models and just get it to randomly pick from that list/string of models? Yes, you can! It's pretty simple too.. // Okay, in this example I'm using a Vehicle style, same thing as Ped but spawning a Vehicle. // We use Model[] VehicleModels = new Model[] to start off and initialise it, and then we do { }; and inside those brackets we list off in strings what models we want spawned. So since I want a cop car, I could put any cop car models in there, which I have done. Model[] VehicleModels = new Model[] { "POLICE", "POLICE2", "POLICE3", "POLICE4", "FBI" }; // Here, we're just doing the same thing we did for our CopPed. we do myCopCar1 to start it off, = new Vehicle to tell the code we're creating a new Vehicle, then (VehicleModels[new Random().Next(VehicleModels.Length)] okay that might sound confusing, but it's just taking the VehicleModels we created, creating a new Random generator type of sorts, and creating the next vehicle to spawn, except randomly. Then we have SpawnPointmyCopCar1.Position to tell it where to spawn the car, again, yours could be as simple as "SpawnPoint". myCopCar1 = new Vehicle(VehicleModels[new Random().Next(VehicleModels.Length)], SpawnPointmyCopCar1.Position); Hope this helped or helps you in the future, if you need any further explaining or have some questions let me know! I'm always here :)
-
GTA V Vehicle Model List? [SOLVED]
I need a Vehicle Model/ID/Name list for coding.. I can't seem to find one that says things like "POLICE1" and "POLICE2" instead of "POLICE CRUISER 1" "POLICE BUFFALO" etc. I need names for like Fire Truck, Ambulance, and a few others so I can implement them into my code. @PNWParksFan maybe you have a site you use? :) Thank you!
-
Blip Still Active After Arrest/Death.
I believe I got it, but I think I'm going to have to change a few things around and assign different things because I have all kinds of Native Functions that I don't believe are going to register or are going to register funky because of how I implemented it, I didn't really blend it in good if you know what I mean. Thank you for all your guys' help, especially @ainesophaur! If I have anymore problems I'll post it on here, thank you! :) EDIT: just fairly tested it, I believe it's working 100% properly, just need to edit the line of text and dialogue, thank you so much! Huge help!
-
Blip Still Active After Arrest/Death.
Nope, not worried at all! Please excuse my messy code haha.
-
Blip Still Active After Arrest/Death.
Where the hell do I put this? If I put it in process I can't get Process()'s end "}" to register so it messes up everything. Says void cannot be used in current context and Process() is called but never used. Process: public override void Process() { base.Process(); //If the player is driving to the scene, and their distance to the scene is less than 15, start the callout's logic. if (state == EMuggingState.EnRoute && Game.LocalPlayer.Character.Position.DistanceTo(new Vector3(-1758.445f, 125.273f, 64.774f)) <= 20) { //Set the player as on scene state = EMuggingState.OnScene; //Start the callout's logic. StartMuggingScenario(); } { { ConversationTypes.Regular, new List<string>() { "Hi Officer!", "Hey suspect, just testing!", "Okay bye now." }; } }; void Process() { List<String> messages = DialogMessages[ConversationTypes.Regular]; String messageToShow = messages[0]; messages.RemoveAt(0); } First part of my code (after public assignments of Ped etc) enum ConversationTypes { Regular, None = 0 } ConversationTypes Current = ConversationTypes.None; Dictionary<ConversationTypes, List<String>> DialogMessages = new Dictionary<ConversationTypes, List<string>>() { { ConversationTypes.Regular, new List<string>() { "Testing Officer", "Okay, sounds good!" } } };
-
Blip Still Active After Arrest/Death.
Woops haha, like I said a bit tired at the moment. I'm still getting an error for mySpeechLines[SpeechIndex]; though.. "Only assignment, call, increment, decrement, and new object expressions can be used as a statement." Any idea on how to fix this? if (Game.IsKeyDown(Settings.TalkKey)) { mySpeechLines[SpeechIndex]; }
-
Blip Still Active After Arrest/Death.
Okay.. so I got the List and the Adding lines etc, but the SpeechIndex has stumbled me because it's saying that it has already been defined and I don't know how to setup the IsKeyDown part as mySpeechLines[SpeechIndex] is saying something about it can't be used as a statement. I'm sure I'm doing a lot wrong and you're probably facepalming right now lol.. Sorry for the troubles Stealth. (I'm trying to crank this update out so I can get it to my BETA testers so I'm really tired as it's getting late haha) if (Game.LocalPlayer.Character.Position.DistanceTo(SpawnPoint) <= 35) { Game.DisplayHelp("Stand back and talk with the suspect."); List<String> mySpeechLines = new List<String>(); int SpeechIndex = 0; mySpeechLines.Add("~b~Officer " + Settings.OfficerName + "~w~: Let it end peacefully by putting the gun down! (1/1)"); int SpeechIndex = 1; if (Game.IsKeyDown(Settings.TalkKey)) { mySpeechLines[SpeechIndex]; } mySpeechLines.Add("~r~Suspect~w~: Why would I? Life isn't worth living for.. (1/2)"); mySpeechLines.Add("~r~Suspect~w~: THEY'RE ALL SLAVES TO THIS SCHOOL, I SHALL LET THEM BE FREE! (2/2)"); mySpeechLines.Add("~b~Officer " + Settings.OfficerName + "~w~: They are scared, can't you see? In their faces.. (1/2)"); mySpeechLines.Add("~b~Officer " + Settings.OfficerName + "~w~: Put it down and we can help you! (2/2)"); int SpeechIndex = 0;
-
Blip Still Active After Arrest/Death.
Yeah that doesn't make any sense to me. I have it as what he told me right now, but what you have stated seems to be the more ideal way to go, if I knew how to do it. If you could post an example later that'd be great, if not I understand - what I have currently will have to work for the time being haha. Thank you everyone for the help!
-
Blip Still Active After Arrest/Death.
Where does estate come from? Am I suppose to create it somewhere or is it from some reference? If it comes from a reference I don't have it as it's showing it doesn't exist. Nice edit btw, lovin' them nuggets? lol
-
Blip Still Active After Arrest/Death.
You talking about instead of TalkKey? I have the key specified in the INI file, I wouldn't want ten different conversation keys if that's what you're saying. @khorio
-
Blip Still Active After Arrest/Death.
Off topic but don't want to start a new topic.. anyone here know how to make it so with the code below to make it so if you hit the key specified, it will read off subtitle one, then the next if you press the specified key after, then the next if you press the specified key again, and so on.. Where it stands when you press the specified key it skips all the way to the bottom. I can see how, but is there something other than IsKeyDown to fix this from skipping to the bottom? Or do I have something setup wrong? Thanks for the help. if (Game.LocalPlayer.Character.Position.DistanceTo(SpawnPoint) <= 35) { Game.DisplayHelp("Stand back and talk with the suspect."); if (Game.IsKeyDown(Settings.TalkKey)) { Game.DisplaySubtitle("~b~Officer " + Settings.OfficerName + "~w~: Let it end peacefully by putting the gun down!", 7500); } if (Game.IsKeyDown(Settings.TalkKey)) { Game.DisplaySubtitle("~b~Officer " + Settings.OfficerName + "~w~: Why would I? Life isn't worth living for..", 5000); } if (Game.IsKeyDown(Settings.TalkKey)) { Game.DisplaySubtitle("~b~Officer " + Settings.OfficerName + "~w~: THEY'RE ALL SLAVES TO THIS SCHOOL, I SHALL LET THEM BE FREE!", 5000); } if (Game.IsKeyDown(Settings.TalkKey)) { Game.DisplaySubtitle("~b~Officer " + Settings.OfficerName + "~w~: They are scared, can't you see? In their faces.. put it down and we can help you!", 7500); }
-
Blip Still Active After Arrest/Death.
Ahh, I didn't know that new Blip(Suspect) also attach's the blip. Thanks Alex, much appreciated!
-
Blip Still Active After Arrest/Death.
Once I added ABlip = new Blip(Suspect); and ABlip.Color and ABlip.EnableRoute it started to not delete the blip after arrests or death. Wicked confused because adding these lines of codes seemed to cause it.. Code below, thank you for any and all help! OnCalloutAccepted(): public override bool OnCalloutAccepted() { //Set the player as en route to the scene state = EVehicleBlockingTrafficState.EnRoute; Game.DisplayNotification("~b~Officer " + Settings.OfficerName + "~w~: Dispatch, show me responding Code 2 to the Suspicious Vehicle."); Functions.PlayScannerAudio("10-4"); ABlip = new Blip(Suspect); ABlip = Suspect.AttachBlip(); ABlip.Color = System.Drawing.Color.Red; ABlip.EnableRoute(System.Drawing.Color.Yellow); //Block permanent events, so the victim doesn't flee if something disturbs them(A vehicle tapping them, etc..), as this would completely disrupt the callout's logic. Suspect.BlockPermanentEvents = true; Process(): public override void Process() { base.Process(); //If the player is driving to the scene, and their distance to the scene is less than 15, start the callout's logic. if (state == EVehicleBlockingTrafficState.EnRoute && Game.LocalPlayer.Character.Position.DistanceTo(spawnPoint) <= 10) { //Set the player as on scene state = EVehicleBlockingTrafficState.OnScene; //Start the callout's logic. StartVehicleBlockingTrafficScenario(); } if (Suspect.IsDead) { Game.DisplayNotification("~b~Officer " + Settings.OfficerName + "~w~: Suspect is down, Code 4."); Game.DisplaySubtitle("Call for Coroner to clean up the dead body.", 10000); Functions.PlayScannerAudio("CODE4 SUSP_DOWN"); ABlip.Delete(); End(); } if (Suspect.IsCuffed) { Game.DisplayNotification("~b~Officer~w~: Suspect in custody, Code 4."); Functions.PlayScannerAudio("CODE4 SUSP_ARRESTED"); ABlip.Delete(); End(); } End(): public override void End() { if (Suspect.Exists()) Suspect.Dismiss(); if (ABlip.Exists()) ABlip.Delete(); base.End(); }
-
How to set a route and how to set a blip color?
Thanks man :)
-
How to set a route and how to set a blip color?
How do you set a route to a blip and how do you set a blip color? I know there's Drawing.Color."color" but I don't know how to use it. Thank you!
-
CREATE_MISSION_TRAIN
Did you happen to get it working? I would love to see a train implemented callout.
-
[CALLING ALL DEVS] Standardisation of API Plugin Colors
In the next version of Unlimited Callouts (v1.5) I will be implementing the blip colors and sizes by these guidelines :)
-
Callout within a Certain Distance?
How do I make it so someone must be within a certain spawnpoint or a certain distance from a point or spawnpoint or wherever the callout spawns or else it will just cancel itself? I have ShowCalloutAreaBlipBeforeAccepting(new Vector3(-1758.445f, 125.273f, 64.774f), 30f); AddMinimumDistanceCheck(100f, new Vector3(-1758.445f, 125.273f, 64.774f)); but it doesn't seem to work as I can be anywhere on the map and it'll still be called and can be accepted. My callout is basically in the school, which is where the coords are, and I just want to make sure you have to be within like a towns/districs distance or else it dispatch won't call you for it or it'll disregard itself.
-
Set SpawnPoint as Coordinates?
SpawnPoint SpawnPointShooter = new SpawnPoint(0.0f, new Vector3(-1758.445f, 125.273f, 64.774f)); What does SpawnPoint(0.0f, represent?
-
Set SpawnPoint as Coordinates?
SpawnPoint SpawnPointShooter = new SpawnPoint(0.0f, new Vector3(-1758.445f, 125.273f, 64.774f)); SpawnPoint SpawnPointVictim1 = new SpawnPoint(0.0f, new Vector3(-1758.445f, 125.273f, 64.774f)); SpawnPoint SpawnPointVictim2 = new SpawnPoint(0.0f, new Vector3(-1758.445f, 125.273f, 64.774f)); SpawnPoint SpawnPointVictim3 = new SpawnPoint(0.0f, new Vector3(-1758.445f, 125.273f, 64.774f)); SpawnPoint SpawnPointVictim4 = new SpawnPoint(0.0f, new Vector3(-1758.445f, 125.273f, 64.774f)); SpawnPoint SpawnPointVictim5 = new SpawnPoint(0.0f, new Vector3(-1758.445f, 125.273f, 64.774f)); SpawnPoint SpawnPointVictim6 = new SpawnPoint(0.0f, new Vector3(-1758.445f, 125.273f, 64.774f)); SpawnPoint SpawnPointVictim7 = new SpawnPoint(0.0f, new Vector3(-1758.445f, 125.273f, 64.774f)); SpawnPoint SpawnPointVictim8 = new SpawnPoint(0.0f, new Vector3(-1758.445f, 125.273f, 64.774f)); SpawnPoint SpawnPointVictim9 = new SpawnPoint(0.0f, new Vector3(-1758.445f, 125.273f, 64.774f)); SpawnPoint SpawnPointVictim10 = new SpawnPoint(0.0f, new Vector3(-1758.445f, 125.273f, 64.774f)); SpawnPoint SpawnPointVictim11 = new SpawnPoint(0.0f, new Vector3(-1758.445f, 125.273f, 64.774f)); SpawnPoint SpawnPointVictim12 = new SpawnPoint(0.0f, new Vector3(-1758.445f, 125.273f, 64.774f)); SpawnPoint SpawnPointVictim13 = new SpawnPoint(0.0f, new Vector3(-1758.445f, 125.273f, 64.774f)); SpawnPoint SpawnPointVictim14 = new SpawnPoint(0.0f, new Vector3(-1758.445f, 125.273f, 64.774f)); Shooter = new Ped(SpawnPointShooter); For Shooter = new Ped(SpawnPointShooter); SpawnPointShooter says can't convert from LSPD_First_Response.Engine.Spawnpoint to Rage.Vector3 ??
-
Set SpawnPoint as Coordinates?
What does 0.0f define in new SpawnPoint(0.0f, new Vector3..? I don't need this do I?