-
Posts
71 -
Joined
-
Last visited
Content Type
Forums
Gallery
Downloads
Tutorials
News Stories
Wiki
Community Guidelines
LSPDFR BOLO Series
GTA5 Native Database
GTA5 Native Parameters
Release Highlights
LSPDFR Mod Showcase
LML User Contributions
Posts posted by SyeDog
-
-
Hello all, me back again with another question i need answering to help improve my Callouts. So onto the question...
I need help editing the inventory which is displayed with a Ped is searched through normal LSPDFR and also StopThePed if able...
Now, i have not been able to find anything to change this through normal LSPDFR but i have come across the Meta data for StopThePed but it doesn't seem to be working the way i have implemented it.
if (stopThePedRunning) { suspect.Metadata.searchPed = "~y~High Powered LaserPointer, ~g~Lighter, ~g~Wallet"; suspect.Metadata.stpAlcoholDetected = false; suspect.Metadata.hasGunPermit = false; }If someone could point me in the right direction that would be most helpful, cheers.
-
1 hour ago, Pazzi said:
object reference error = null pointer exception
that means your suspect object is null. make sure to create the suspect instance properly
another tips to avoid crash, basically you need to check the entity (ped/vehicles) to make sure it is not null or invalid, like this:
if (Suspect != null && Suspect.IsValid() && (Suspect.IsDead || Suspect.IsCuffed)) { End(); }
Hey, just wanted to say thank you. Adding the check to see if the Suspect was valid and not set to null has solved the issue, must have been trying to run that check before the Suspect was created which was throwing the error. Not only has it solved my issue but also taught me a lesson on errors and also how LSPDFR runs through a callout. Thanks again.
-
Just now, HazyTube said:
Use this:
//If the player presses the end key, the callout will be ended if (Game.IsKeyDownRightNow(System.Windows.Forms.Keys.End)) { Logger.DebugLog("User pressed end to end the callout"); End(); } //If the suspect is dead or is cuffed we call the end method if (Suspect.IsDead || Suspect.IsCuffed) { End(); }You also don't need to create a new gamefiber, with this ^ the player also has the ability to end the callout by pressing end.
Yeah i have a way to end with the end key later on, i added the game fiber to try and fix the issue but it persisted.
The game still gives me the object reference error with just
if (Suspect.IsDead || Suspect.IsCuffed) { End(); }The Suspect is created in a sub method of a callout handler which picks from 4 situations if thats any use to the solution
oncalloutaccepted() { callouthandler() } callouthandler() { create random int if(roll = 1) { situation1() } } situation1() { suspect = new Ped() }Hopefully use can understand the flow of things without me having to copy all the code, as i am away from my computer now.
-
Hello, following a suggestion from another member on the forums for my callout i have been trying to add more ways to end my callouts for example, when a ped dies or is cuffed ect.
My issue is that when i impliment the code, it keeps crashing my callout or LSPDFR itself. Below i have listed the common errors i get and the code where the error is taking place. Hopefully someone can help or guide me to a solution as looking a few pages back, someone else had a similar issue but is using the same code as me to end the call, just mine isnt working. Thanks in advance.
[4/9/2019 3:26:21 PM.450] LSPD First Response: OTB - Police Radio audio should have been played sucessfully [4/9/2019 3:26:23 PM.630] LSPD First Response: Roll: 1 [4/9/2019 3:26:23 PM.631] LSPD First Response: [TRACE] Cleaning UI [4/9/2019 3:26:23 PM.633] LSPD First Response: [TRACE] User accepted callout [4/9/2019 3:26:23 PM.651] LSPD First Response: Error while processing callout: GraffitiCall: Object reference not set to an instance of an object. at OTBCallouts.Callouts.GraffitiCall.Process() in On The Beat Callouts\Callouts\GraffitiCall.cs:line 466 [4/9/2019 3:26:23 PM.651] at .() in E:\GTA V\LSPD First Response\LSPD First Response\Mod\Callouts\CalloutManager.cs:line 186 [4/9/2019 3:26:23 PM.652] LSPD First Response: EndCurrentCallout: Finishing... [4/9/2019 3:26:23 PM.653] LSPD First Response: OTB - Call ending, computerPlus Updated [4/9/2019 3:26:23 PM.653] LSPD First Response: OTB - Cleanup initiated, removing callout assests [4/9/2019 3:26:23 PM.654] LSPD First Response: [TRACE] Cleaning UI [4/9/2019 3:26:23 PM.656] LSPD First Response: [TRACE] Released 0 entities from #1 Content Manager [4/9/2019 3:26:23 PM.656] LSPD First Response: [TRACE] Instance cleaned ( #1) [4/9/2019 3:26:23 PM.661] LSPD First Response: OTB - Search area init complete successfullypublic override void Process() { GameFiber.StartNew(delegate { while (hasArrived) GameFiber.Yield(); if (Suspect.IsCuffed || Suspect.IsDead || !Suspect.Exists()) { End(); } }); base.Process(); }If people need more information i can provide more logs or information about the callout process if needed. Thanks!
-
@sssneaky Just wanted to say thank you for the shout out on here, OTB Callouts is going to be getting a reasonable upgrade soon. Adding more to the callouts it already has and hopefully can start on getting some new callout soon. Did start work on a menu system for the callouts but had to go back to square one, which means it will not be in the new update when released. Glad you like the pack and glad its stable!
-
3 minutes ago, Bleddyn Welch said:
ok thanks i think i can do this now
glad i helped, hopefully someone with abit more knowledge and experience can help both of us further. I just need to sort rotation now i suppose! as my cans stuck through my hand haha
-
20 minutes ago, Bleddyn Welch said:
i have no clue but the code i used is
SprayCan = new Rage.Object("ng_proc_spraycan01b", SpawnPoint, 0f);but with other names and heading
fixed it myself, it was an error with my animation code as it was waitingforcompletion forever and never getting to the point where i spawn the can
public void attachSprayCan() { Vector3 sprayCanOffset = new Vector3(0, 0, 0); Rotator spraycanRotation = new Rotator(0, 0, 0); int boneIndex = Suspect.GetBoneIndex("BONETAG_R_HAND"); SprayCan = new Rage.Object("ng_proc_spraycan01b", SpawnPoint, 0f); SprayCan.AttachTo(Suspect, boneIndex, sprayCanOffset, spraycanRotation); Game.LogTrivial("OTB - SprayCan added to ped's right hand" + boneIndex.ToString()); }There is probably a much cleaner and better way of doing this but this is my working code for spawning in a spraycan and attaching it to the spawned peds right hand.
Best way i found to find prop names was to use openIV and search for the name or object you want which will return a object file with the correct name to use. Hopefully some of this information helps!
You can also find the bone list in the ragehook documentation
-
4 minutes ago, Bleddyn Welch said:
yea my game only crashed when looking at the object. My spawning is for my drug bust calllout trying to spawn some weed plants and tables.z
Cant even get mine to spawn with the code above
-
I was going to post this exact question but with alittle bit more detail, i also need to attatch the prop to the spawns peds hand. I have this code currently, doesnt throw an error but does seem to kill my callout without spawning anything.
public void attachSprayCan() { Vector3 sprayCanOffset = new Vector3(0, 0, 0); Rotator spraycanRotation = new Rotator(0, 0, 0); int boneIndex = Suspect.GetBoneIndex("SKEL_R_Hand"); SprayCan = new Rage.Object("ng_proc_spraycan01b", SpawnPoint, 0f); SprayCan.AttachTo(Suspect, boneIndex, sprayCanOffset, spraycanRotation); Game.LogTrivial("OTB - SprayCan added to ped's right hand" + boneIndex.ToString()); }Hopefully someone out there could help both of us at the same time plus hopefully the additonal information should be useful for you Bleddyn
-
Thank you for the information, that would defiantly be a improvement, because as i take it the mod it totally hidden from being viewed by anyone while the security check is being made so just using my mod for an example as its what i know. No one could see my callout pack for 18ish hours.
Even if they could see the page for it but have the downloads blocked for the new version until checked, people could have a message on there saying the new version is up for review. I like that idea alot.
Anyways thanks for the clarification, i understand why and i would want to be thorough with the checks too, its peoples computers and data that could be at risk.
While on the subject, is there a way to delete an old version without having to use the upload a new version system as i made a mistake with naming my rar files yesterday and then had to wait through another security check because i deleted the old rar and hadn't changed the new version at all. Again i understand why and it could be me making a silly mistake but it was the only way i could find to do it.
-
So i make a callout pack called On the beat Callouts. i have updated it recently and its been filed for manual security checks due to executable code in my pack. I however have no idea what code is making this happen as others with more complex codes seem to be getting their packs checked way before mine, i uploaded my file about 18hours ago and its still not been checked.
Its really hurting my download count and availability of my mod in general.
The things i have in my mod is other peoples API's, albo's code for checking lspdfr and computer plus version but i am not collecting any data nor am i doing actual version checks to whats available online, that i know of.
Just need some advice to help me understand why my files have such a long check time while other packs are sailing through the checks and are released within the hour of them updating.
-
12 minutes ago, epicmrjuan said:
Hey,
when you spawn a ped you can use:
public Ped( Vector3 position, float heading )
Example:
Ped p = new Ped(new vector3(1,1,1),7) //This will spawn a ped at 1,1,1 and with a heading of 7
When you have already spawned it and want to change it's location use: Ped.Posistion
I hope this helps! let me know if there is anything else i can do!
Used pages:
Thanks for that!
So if i was wanting a variable of SpawnPoint to be used later i could use
private Vector3 SpawnPoint; Ped Suspect = new Ped(new Vector3(1, 1, 1), 7); //spawning a new ped called Suspect at 1,1,1 with heading 7 SpawnPoint = Suspect.Position; //Setting the spawnpoint location to the position of spawned pedCorrect or totally wrong?
-
Hello all, i am having troubles finding the information i need through google searches and looking through open source code.
I am trying to spawn a ped at a certain location on the map for a callout i have the x,y,z and heading but cannot seem to work out how to spawn the ped at the location.
There were some forum posts talking about a SpawnPoint method but i cannot for the life of me work out how to access it if it exists or how to make one.
Does anyone have any idea on how to do this using C# as it will be fundermental in my callouts when setting up scenes ect.
Thank you for any and all information, even suggestions on what to search for will be very useful. Cheers
-
3 minutes ago, creator2013 said:
Yes. Create a static class named Function and put the method in there.
You are a life saver, thank you so much.
-
1 hour ago, creator2013 said:
This is refering to the class Function in the example callout plugin (click here to see what I mean). You either have to create your own function class with all your useful functions in it or define the method IsLSPDFRPluginRunning in your main class instead.
Thank you so much, i think i have my head around it now, so what you are saying is where they said put it in a easierly accessable method, they mean make a new class and call it Function which i can then access using
computerPlusRunning = Function.IsLSPDFRPluginRunning("ComputerPlus", new Version("1.3.0.0"));If you could just confirm that, that would be super.
Thanks a bunch for the quick reply.
-
I have been trying to develop a Callouts pack for the last few days, i have managed to create a pursuit and have it all handled by LSPDFR which i am currently really proud of, now i have set my sights to integrating my callouts with ComputerPlus, the computer modification for LSPDFR.
I have read the documentation, set up my files the same as others have done such as Albo1125 in his open source documents but i am unable to get it to work, i have run into the error that Function is inaccessible due to its protection level. I have tried to access Function can it brings me to an empty function class called Function in ComputerPlus but i am unable to edit it from internal to public or anything.
computerPlusRunning = Function.IsLSPDFRPluginRunning("ComputerPlus", new Version("1.3.0.0"));ComputerPlusFuncs works without error such as the following code
public override void OnCalloutDisplayed() { if (computerPlusRunning) { ComputerPlusFuncs.UpdateCalloutStatus(callID, (int)ECallStatus.Dispatched); } base.OnCalloutDisplayed(); }Any and all advice would be really appreciated, i am very very new to c# and this has caused me to grind to a halt.
-
Hey everyone,
After being inspired by the other channels on the youtubes of people playing through the LSPDFR mod i thought i would take up the gauntlet, now i do not pretend to be the best, i have recently bought a new mic and cannot for the life of me get my audio levels right yet. But i do need feedback, sooooo.... i have placed the video below, please comment with improvements and like the video if you do.
I also promise to you with your support and feedback i can make a huge improvement to my work, but i hope this is a good starting point, thanks to those who take the time to watch!


Ped Search inventory, how do i edit this?
in Tutorials & Questions
Posted
I didnt really no, they were adding some api fixes for it before i had to take some time away. Hopefully there's more information out there currently