Jump to content

Attaching a prompt to a ped


bolmin
 Share

Recommended Posts

Hi, I was wondering is it possible to add a prompt to an exisiting ped like the valentine gunsmith. Do you use the set prompt group native or something else? I uploaded an image of what I mean by prompts attached to peds.

gunsmiths-e1573117906896.png

Link to comment
Share on other sites

Prompts are merged by default iirc, so all you need to do is add them to the ped and if they have a different key, they will show up. If they use a key already bound, you might have to set the priority.

Link to comment
Share on other sites

I know how prompts work but I have no idea how to find the hash for the valentine gunsmith ped, then find the group where his prompts are assigned to and finally how to add a prompt to him. Still, thanks for the reply

Link to comment
Share on other sites

Find the ped handle by looking for peds close the location where you expect it to spawn, then check for the model. Once you got the ped, you can get the ped's prompt group and add prompts to it. Should still auto-merge.

Link to comment
Share on other sites

okay so I tried using

 

Entity EntityTarget;
        if (PLAYER::GET_ENTITY_PLAYER_IS_FREE_AIMING_AT(PLAYER::PLAYER_ID(), &EntityTarget))
        {

          if (ENTITY::IS_ENTITY_A_PED(EntityTarget)) 
                {

           //output EntityTarget

     

but I am not sure if I am doing the correct thing

Link to comment
Share on other sites

Looks good at first glance, try killing or doing something else very visible to the entity to know whether it picks it up currently. Also free aim I think is limited to aiming with a firearm, not just targeting them.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...