KnucklesL.U.A Posted August 11, 2017 Share 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) Link to comment
' A F . Posted August 11, 2017 Share Posted August 11, 2017 addEventHandler("onClientPlayerChoke",root,function() if ( source == localPlayer and getPlayerTeam ( localPlayer ) and getPlayerTeam ( localPlayer ) == getTeamFromName("Police") ) then cancelEvent ( ) end end ) ; Link to comment
KnucklesL.U.A Posted August 11, 2017 Author Share 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 Link to comment
NeXuS™ Posted August 11, 2017 Share Posted August 11, 2017 (edited) How do you define the wanted player? Do you use setPlayerWantedLevel for it? Edited August 11, 2017 by NeXuS™ Link to comment
KnucklesL.U.A Posted August 11, 2017 Author Share 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 Link to comment
NeXuS™ Posted August 11, 2017 Share 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™ Link to comment
KnucklesL.U.A Posted August 11, 2017 Author Share 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 Link to comment
NeXuS™ Posted August 11, 2017 Share Posted August 11, 2017 function cancelTearGasChoking(weaponID, responsiblePed) if (getPlayerWantedLevel(localPlayer) == 0 and weaponID == 17) then cancelEvent() end end addEventHandler("onClientPlayerChoke", cancelTearGasChoking) Link to comment
KnucklesL.U.A Posted August 11, 2017 Author Share 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? Link to comment
NeXuS™ Posted August 11, 2017 Share Posted August 11, 2017 Only wanted players will choke with this script. I suppose policemans wont be criminals too. Link to comment
KnucklesL.U.A Posted August 11, 2017 Author Share 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 Link to comment
NeXuS™ Posted August 11, 2017 Share 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) Link to comment
KnucklesL.U.A Posted August 11, 2017 Author Share 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? Link to comment
NeXuS™ Posted August 11, 2017 Share Posted August 11, 2017 I won't test until I don't see what's the problem. Link to comment
KnucklesL.U.A Posted August 12, 2017 Author Share Posted August 12, 2017 20 hours ago, NeXuS™ said: I won't test until I don't see what's the problem. Test it Link to comment
Rockyz Posted August 12, 2017 Share Posted August 12, 2017 i didn't understand whats your problem. Link to comment
NeXuS™ Posted August 12, 2017 Share 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 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