ItsClonkAndre Posted October 21, 2020 Share Posted October 21, 2020 Hi, is there a function to check the current item that is in the hand of the player? Like for example if i pick up a brick. Link to comment Share on other sites More sharing options...
Teki Posted October 22, 2020 Share Posted October 22, 2020 In C# you could do : ped.Weapons.Current Link to comment Share on other sites More sharing options...
ItsClonkAndre Posted October 30, 2020 Author Share Posted October 30, 2020 Hello @Teki, your suggestion is working. But: If i pick up a brick it identifies it self as an Object, wich is right but, is there a way to see what type of Object the player has in his hands? Like for example a brick or a can. I honestly don't think that you can do that but its worth it to ask Link to comment Share on other sites More sharing options...
Teki Posted October 31, 2020 Share Posted October 31, 2020 In case your weapon is an object like brick/can/etc you can identify it like this : GTA.Object inHand = Function.Call<GTA.Object>("GET_OBJECT_PED_IS_HOLDING", Player.Character); if (inHand != null && inHand.Exists()) { text += "CurWeapon: " + inHand.Model.Hash + "\n"; } inHand is a GTA.Object and has a model you can identify through the hash. ItsClonkAndre 1 Link to comment Share on other sites More sharing options...
ItsClonkAndre Posted October 31, 2020 Author Share Posted October 31, 2020 I didn't think that would work, but it does I can always rely on you. Thanks! Teki 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now