Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function preventDM ( attacker, attacker2 )
- if ( attacker2 ) and ( attacker ) and ( attacker ~= attacker2 ) then
- local attackerTeam = ( getTeamName( getPlayerTeam( attacker ) ) )
- local sourceTeam = ( getTeamName( getPlayerTeam( attacker2 ) ) )
- if ( getElementDimension ( attacker ) == 0 and getElementDimension ( attacker2 ) == 0 ) then
- if ( attackerTeam == "Criminals" ) then
- if ( sourceTeam == "Criminals" ) or ( sourceTeam == "Civilian Workers" ) then
- return false
- else
- return true
- end
- elseif ( attackerTeam == "Civilian Workers" ) then
- if ( sourceTeam == "Criminals" ) or ( sourceTeam == "Civilian Workers" ) then
- return false
- else
- return true
- end
- end
- end
- end
- end
- addEventHandler ( "onClientPlayerWeaponFire", getLocalPlayer(), preventDM )
Advertisement
Add Comment
Please, Sign In to add comment