KnucklesL.U.A Posted August 11, 2017 Posted August 11, 2017 hey i want when a cop throughs tear gas it dosn't effect him only wanted player CODE: Quote function cancelTearGasChoking(weaponID, responsiblePed) if (team==Police) then cancelEvent() end end addEventHandler("onClientPlayerChoke", cancelTearGasChoking)
' A F . Posted August 11, 2017 Posted August 11, 2017 addEventHandler("onClientPlayerChoke",root,function() if ( source == localPlayer and getPlayerTeam ( localPlayer ) and getPlayerTeam ( localPlayer ) == getTeamFromName("Police") ) then cancelEvent ( ) end end ) ;
KnucklesL.U.A Posted August 11, 2017 Author Posted August 11, 2017 21 minutes ago, Default said: addEventHandler("onClientPlayerChoke",root,function() if ( source == localPlayer and getPlayerTeam ( localPlayer ) and getPlayerTeam ( localPlayer ) == getTeamFromName("Police") ) then cancelEvent ( ) end end ) ; Still Choking
NeXuS™ Posted August 11, 2017 Posted August 11, 2017 (edited) How do you define the wanted player? Do you use setPlayerWantedLevel for it? Edited August 11, 2017 by NeXuS™
KnucklesL.U.A Posted August 11, 2017 Author Posted August 11, 2017 7 minutes ago, NeXuS™ said: How do you define the wanted player? Do you use setWantedLevel for it? THe player Must be Wanted no matter + I want when Law Units through Teargas it effects Wanted Criminals not them
NeXuS™ Posted August 11, 2017 Posted August 11, 2017 (edited) But how do you define the wanted player? Do you use element data on him? Do you use setPlayerWantedLevel? Edited August 11, 2017 by NeXuS™
KnucklesL.U.A Posted August 11, 2017 Author Posted August 11, 2017 2 minutes ago, NeXuS™ said: But how do you define the wanted player? Do you use element data on him? Do you use setWantedLevel? Yes I just want Cops Dont Choke and Wanted Players Choke
NeXuS™ Posted August 11, 2017 Posted August 11, 2017 function cancelTearGasChoking(weaponID, responsiblePed) if (getPlayerWantedLevel(localPlayer) == 0 and weaponID == 17) then cancelEvent() end end addEventHandler("onClientPlayerChoke", cancelTearGasChoking)
KnucklesL.U.A Posted August 11, 2017 Author Posted August 11, 2017 2 minutes ago, NeXuS™ said: function cancelTearGasChoking(weaponID, responsiblePed) if (getPlayerWantedLevel(localPlayer) == 0 and weaponID == 17) then cancelEvent() end end addEventHandler("onClientPlayerChoke", cancelTearGasChoking) What about Police Team? i want when they through teargas they dont choke is that in there?
NeXuS™ Posted August 11, 2017 Posted August 11, 2017 Only wanted players will choke with this script. I suppose policemans wont be criminals too.
KnucklesL.U.A Posted August 11, 2017 Author Posted August 11, 2017 25 minutes ago, NeXuS™ said: Only wanted players will choke with this script. I suppose policemans wont be criminals too. i still choke. http://imgur.com/a/977fy
NeXuS™ Posted August 11, 2017 Posted August 11, 2017 Ahh, because you don't know how to use debugscript. function cancelTearGasChoking(weaponID, responsiblePed) if (getPlayerWantedLevel(localPlayer) == 0 and weaponID == 17) then cancelEvent() end end addEventHandler("onClientPlayerChoke", localPlayer, cancelTearGasChoking)
KnucklesL.U.A Posted August 11, 2017 Author Posted August 11, 2017 1 minute ago, NeXuS™ said: Ahh, because you don't know how to use debugscript. function cancelTearGasChoking(weaponID, responsiblePed) if (getPlayerWantedLevel(localPlayer) == 0 and weaponID == 17) then cancelEvent() end end addEventHandler("onClientPlayerChoke", localPlayer, cancelTearGasChoking) U Tested any of this?
NeXuS™ Posted August 11, 2017 Posted August 11, 2017 I won't test until I don't see what's the problem.
KnucklesL.U.A Posted August 12, 2017 Author Posted August 12, 2017 20 hours ago, NeXuS™ said: I won't test until I don't see what's the problem. Test it
NeXuS™ Posted August 12, 2017 Posted August 12, 2017 Test it yourself mate. You ain't even trying to do the script yourself, we are doing the whole thing for you. 1
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