SkatCh Posted December 28, 2014 Share Posted December 28, 2014 Hi guys please i have a simple question and i need answer , how can i stop player coughing when i use spraycan as a medic ? Link to comment
Addlibs Posted December 28, 2014 Share Posted December 28, 2014 function immunity ( attacker, weapon, bodypart ) if ( weapon == 41 ) then --if the weapon used was the spray-can (41) cancelEvent() --cancel the event end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), immunity ) You'll need to edit this to make it cancel only when 'attacker' is a medic Link to comment
SkatCh Posted December 28, 2014 Author Share Posted December 28, 2014 i know evrey thing about how to stop damage etc but the player still coughing when i use the sprycan to heal him. Link to comment
xeon17 Posted December 28, 2014 Share Posted December 28, 2014 function onClientPlayerWeaponFireFunc(weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement) if (weapon == 41) then toggleControl ( "fire" , false) else toggleControl ( "fire",true) end end addEventHandler("onClientPlayerWeaponFire", root, onClientPlayerWeaponFireFunc) Link to comment
ViRuZGamiing Posted December 28, 2014 Share Posted December 28, 2014 https://wiki.multitheftauto.com/wiki/IsPedChoking Link to comment
SkatCh Posted December 29, 2014 Author Share Posted December 29, 2014 sorry guys no one gave me the right answer , can anyone tell me how to stop coughing . Link to comment
SkatCh Posted December 29, 2014 Author Share Posted December 29, 2014 any help just i need to check if the player is coughing to stop him. is it possible using this function isPedChoking Link to comment
MTA Team botder Posted December 29, 2014 MTA Team Share Posted December 29, 2014 Does this [onClientPlayerChoke] event work? Link to comment
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