Everything posted by epicmrjuan
-
Spawn Locations
public static Vector3 GetNextPositionOnStreet( Vector3 position ) Will return a position that is on the street, instead use: SpawnPoint1 = new Vector3(-1029.94336f, -1604.27209f, 4.95688f);
-
Combat Peds problem [Callout]
Bool HasItRan = False; void Process(){ if(!HasItRan){ //runcode } }
-
Combat Peds problem [Callout]
So, depending an what you want you have multiple options: Option 1: Make your suspect fire at a ped, then check if your ped has died if that returns true; make him shoot at you. Option 2: Make your suspect fire at a ped, then when it has died make your suspect fire randomly at all hated peds (or all peds, your choice). public static Ped[] GetAllPeds(); Use a foreach, and then use an if statments to set a max distance to your ped, check if your ped hate each other, check if any ped is shooting. On the second thing, make sure it is not on a loop, for instance process() is on a loop so if you were to put that code in there without making sure it is only runned once, it wil just keep doing that every iteration. If that is not the case could you provide some code? Greetings juan
-
Combat Peds problem [Callout]
Hey, You can use: public Task FireWeaponAt( Entity target, int duration, FiringPattern firingPattern ) And if you want the ped to get closer you can use: public Task GoToWhileAiming( Entity entity, Entity entityToAimAt, float distanceThreshold, float speed, bool fireWeapon, FiringPattern firingPattern ) This will make sure that the ped keeps shoothing (or not depending on what you tell him to do) Could you try this? Tell me how it went. Greeting juan.
-
Spawned Ped not Attacking Active Peds
public static Ped[] GetAllPedsInArea(Vector3 location, float radius) { Ped[] allpeds = Rage.World.GetAllPeds(); List<Ped> PedsInRadius = new List<Ped>(); foreach (Ped p in allpeds) { if(p.DistanceTo(location) <= radius) { PedsInRadius.Add(p); } } if(PedsInRadius.Count <= 1) { PedsInRadius.Add(new Ped(location)); } return PedsInRadius.ToArray(); } no guarantee that it works, but Rage.World has GetAllEntities method. (the code came from an old callout of mine, so it might not work or not be the best way of doing it)
-
police5,police6 and so on
The amount of vehicles doesn't matter (there is a max. but you can download a GameConfig.xml that will remove it), the amount of dlcpacks does, Albos modding pack will always be on top of evrything so you don't have to worry about Handling lines not working because there is a newer patchday thats overiding it.
-
police5,police6 and so on
i would advise you to use: However the game will not work if you have too many dlcpacks, if you do have to many use the latest patchday for the safest route, less chance of another patchday overiding your vehicles. And on the meta part yes, only thing you have to make sure is that u use the right handlingline and if the car comes with a vehicles.meta use that one ofcourse
-
playscanneraudio
Use : Functions.PlayScannerAudio("AUDIONAME") As far as i know Code_4 audio does not come with lspdfr, so you will need to make your own audio files eather by extracting them from the game or, editing exsisting audio files and merge them into 1. This time I will provide the code_4 audio for you, you just need to rename these and place them in LSPDFR/ScannerAudio/_CustomCalloutFolder: https://drive.google.com/drive/folders/1di-5h9R4188xOFUt6faf_MnzSkdjW2uf
-
'None-invocable member 'Entity.Heading' cannot be used like a method.'
And on the 'There was a mismatch between the processor ar... Go in visual studio to Project > _Csproj Propeties > build And set platform target to x64.
-
'None-invocable member 'Entity.Heading' cannot be used like a method.'
Game.LocalPlayer.Character.Heading(180f)); Cannot be used as a method, as the error states. It can only Get or Set a value. You could calculate the heading yourself or use public override void Face( Vector3 position ) Where posistion is Game.LocalPlayer.Character
-
Callouts
NL: Hey, ik zou je aanraden om te beginnen albo's Guides te lezen: https://github.com/LMSDev/LSPDFR-API/blob/master/API Documentation/Guide to using the LSPDFR API and Documentation - Albo1125.pdf Bijberhorende bestanden: https://github.com/LMSDev/LSPDFR-API/tree/master/API Examples/Albo1125-LSPDFR-API-Guide-Final-Project Hier zul je redelijk ver mee komen, als je nog hulp nodig hebt na dat je het hebt gelezen wil ik je graag verder helpen. EN: Hey, first off i would recommend you read albo1125 guide for the api: https://github.com/LMSDev/LSPDFR-API/blob/master/API Documentation/Guide to using the LSPDFR API and Documentation - Albo1125.pdf Code: https://github.com/LMSDev/LSPDFR-API/tree/master/API Examples/Albo1125-LSPDFR-API-Guide-Final-Project This will get you quite far, if you need any further assistance after you have read/watched the documentation/video don't be afraid to ask greetings juan EDIT: TL;DR van het probleem is dat je je callouts laad als een plugin i.p.v. Lspdfr die de callouts laad. Also video:
-
Callouts
1. It is easier for us to help you if you provide code of your Main or EntryPoint 2. If it is a LSPDFR callout it should be placed in GTAV\Plugins\lspdfr\xxx.dll else you can get faster help in the ragepluginhook discord greeting juan
-
[removed]
[removed]
-
Specific Ped Characters
public Ped( Model model, Vector3 position, float heading ) http://docs.ragepluginhook.net/html/M_Rage_Ped__ctor_1.htm Usage: Suspect = new Ped("Model", Pedvector, Pedheading)
-
Using Albo1125's APIs
In the documents above?
-
Using Albo1125's APIs
Call CreateNewCourtCase.
-
Homeless disturbance
-
These guys are gonna have to move.
From the album: Homeless disturbance
-
Coding conversation problem.
GameFiber.StartNew(delegate { Game.DisplaySubtitle("text1"); GameFiber.sleep(200); Game.DisplaySubtitle("text2"); GameFiber.sleep(200); } This should work.
-
Coding conversation problem.
I think you are hibernating the main fiber, make a new one. Here is a topic on conversations:
-
Select bone and set posistion of that bone native
Hey guys i have 1 questions How to set a location of a bone/I can't seem to select a bone of a certain ped/vehicle.
-
How do you code conversations with suspects/victims?
enum ConversationTypes { HandsUp, Donut } ConversationTypes Current = ConversationTypes.None; List<String>.Enumerator CurrentDialog; Dictionary<ConversationTypes, List<String>> DialogMessages = new Dictionary<ConversationTypes, List<string>>() { { ConversationTypes.HandsUp, new List<string>() { "how your doinng", "Very well oficer" } }, { ConversationTypes.Donut, new List<string>() { "mmm a donut!" } } Current = ConversationTypes.Donut; CurrentDialog = DialogMessages[Current].GetEnumerator(); if Game.LocalPlayer.Character.Position.DistanceTo(Call) <= 60f) { if (Game.IsKeyDown(Settings.TalkKey)) //This is in a ini file { if (CurrentDialog.MoveNext()) { Game.DisplaySubtitle(CurrentDialog.Current, 7500); } } } https://msdn.microsoft.com/en-us/library/xfhwa508(v=vs.110).aspx Does this help? of you have any more problems feel free to tell them.
-
Game Crash [Fresh Reinstall]
Do this, it might fix your problem already or it can help you with giving us information about you issue. :P Or just post your log
-
Changing Ped Details?
Please use the search fuction of this forum, you can get quite a lot of answers that way.
-
Hot Pursuit of a Bus?
⬆⬆⬆⬆⬆⬆⬆⬆⬆ Have you tried adding this [Ped:MP_M_FREEMODE_01] FuncHolster=True FuncIntim=True FuncIntimMesh=7:8,7:7,7:6 7:8=7:2 7:1=7:3 [Ped:MP_F_FREEMODE_01] FuncHolster=True FuncIntim=True FuncIntimMesh=7:8 7:8=7:2 7:1=7:3