Jump to content

TearGas Team protection


Recommended Posts

Posted

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)

 

Posted
addEventHandler("onClientPlayerChoke",root,function()
if ( source == localPlayer and getPlayerTeam ( localPlayer ) and getPlayerTeam ( localPlayer ) == getTeamFromName("Police") ) then 
cancelEvent ( ) 
end
end ) ; 

 

Posted
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

 

Posted
function cancelTearGasChoking(weaponID, responsiblePed)
    if (getPlayerWantedLevel(localPlayer) == 0 and weaponID == 17) then
		cancelEvent()
    end
end
addEventHandler("onClientPlayerChoke", cancelTearGasChoking) 

 

Posted
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?

 

 

Posted

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) 

 

Posted
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?

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...