ProudDesk Posted December 22, 2020 Share Posted December 22, 2020 This is my third question but I have been searching for a long while now with a bunch off different contexts but I cant find out how to do something/check when a player punches something. Link to comment Share on other sites More sharing options...
LeeC22 Posted December 23, 2020 Share Posted December 23, 2020 1 hour ago, ProudDesk said: This is my third question but I have been searching for a long while now with a bunch off different contexts but I cant find out how to do something/check when a player punches something. I don't have much time for a longer answer but this might get you on the right track. This will check if you are currently unarmed, meaning you are using fists. Weapon currentWeapon = Game.Player.Character.Weapons.Current; if (currentWeapon.Hash == WeaponHash.Unarmed) { } You can probably use these Natives to do the rest of the work, you can find more info about them on the NativeDB, which is this website if you've never been there before. http://www.dev-c.com/nativedb/ HAS_PLAYER_DAMAGED_AT_LEAST_ONE_PED CLEAR_PLAYER_HAS_DAMAGED_AT_LEAST_ONE_PED GET_MELEE_TARGET_FOR_PED HAS_ENTITY_BEEN_DAMAGED_BY_ENTITY // SHVDN version Ped.HasBeenDamagedBy(Entity entity) HAS_PED_BEEN_DAMAGED_BY_WEAPON Use the clear damage one after the top native has returned true and you have done any other actions you need to do with the ped you have punched. 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