bolmin 33 Posted January 11, 2021 Share Posted January 11, 2021 Hi everyone, it is me yet again In rdrfr I saw that there are custom made prompt groups and I want to ask the developers how they achieved that, since I don't know any native to create a prompt group. I suppose that in RPH there is a function that does that, so I'm still looking for that. In case you don't understand what I mean, I attached a screenshot where the prompt group is called "Sheriff's Desk". Quote Link to comment Share on other sites More sharing options...
Lambda 23 Posted January 11, 2021 Share Posted January 11, 2021 Spoiler UI::_UIPROMPT_GET_GROUP_ID_FOR_TARGET_ENTITY(Entity target); UI::_UIPROMPT_SET_GROUP(prompt, group_id, 0); Quote Link to comment Share on other sites More sharing options...
bolmin 33 Posted January 11, 2021 Author Share Posted January 11, 2021 You see the problem is that this prompt group is not naturally there. I don't know if it exists in the game at some point, but it seems to be added for the mod. I am asking if it is possible to create a new prompt group with a new name. Also while we are talking about prompts, I am don't know how to check if the player is focusing on a ped so that the dialogue options appear. I know that there is a native that returns the entity player is free aiming at and the target entity, but both of these do not return anything when just locking on a ped. Quote Link to comment Share on other sites More sharing options...
LMS 673 Posted January 11, 2021 Share Posted January 11, 2021 We use a mixed approach in RDRFR. We get the group id as just Lambda has shown you, but also set the desk's group to be the active ambient prompt group if the player is close via 0x315C81D760609108 / _UIPROMPT_SET_AMBIENT_GROUP_THIS_FRAME. This is also where we feed the key (not the actual string!) to our custom name. 1 Quote Link to comment Share on other sites More sharing options...
bolmin 33 Posted January 12, 2021 Author Share Posted January 12, 2021 Thank you this explains a lot! Quote Link to comment Share on other sites More sharing options...
Gacsam 0 Posted January 13, 2021 Share Posted January 13, 2021 On 1/11/2021 at 10:07 PM, bolmin said: I know that there is a native that returns the entity player is free aiming at and the target entity, but both of these do not return anything when just locking on a ped. From my testing "free aim" means your aim being free - not locked onto a ped - as it works when not targeting anything or "freely"? aiming around with a gun. I'm using ScriptHookDotNet and this piece of code to check what you're locked onto. OutputArgument outputTarget = new OutputArgument(); if (Function.Call<bool>(Hash.IS_PLAYER_TARGETTING_ANYTHING, Game.Player)){ if (Function.Call<bool>(Hash.GET_PLAYER_TARGET_ENTITY, Game.Player, outputTarget)){ if (outputTarget.GetResult<Entity>().EntityType == EntityType.Ped){ Ped theTarget = outputTarget.GetResult<Ped>(); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.