tommymaster Posted November 26, 2017 Posted November 26, 2017 (edited) Hi! I want to make a full unique damage system, and i want to test it on peds. For example if a ped gets a bullet in the arm, it notifies me in debug script that this happened. I searched, but found nothin except onPlayerDamage, which is not concerning peds. Could you help me with this? I mean could you write a script about the example i mentioned above? Edited November 26, 2017 by tommymaster
itHyperoX Posted November 26, 2017 Posted November 26, 2017 (edited) addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), function ( attacker, weapon, bodypart ) if (bodypart == 9) then outputChatBox("That was a hs") end end ) Edited November 26, 2017 by TheMOG 1
Moderators IIYAMA Posted November 26, 2017 Moderators Posted November 26, 2017 https://wiki.multitheftauto.com/wiki/Client_Scripting_Events#Ped_events There are no ped damage events serverside. 1 Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
Moderators IIYAMA Posted November 29, 2017 Moderators Posted November 29, 2017 @tommymaster You may want to reply. 1 Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
tommymaster Posted December 6, 2017 Author Posted December 6, 2017 sorry, i forgot. thanks for your answer.
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