Jump to content

setwantedlvl not working any help


nasserdfdd

Recommended Posts

hi all so this script does not cancel wanted lvl why

  
function test ( source,killer )  
    local level = getPlayerWantedLevel ( killer ) 
       if getTeamName(getPlayerTeam(killer)) == "Criminal" then 
         if getTeamName(getPlayerTeam(source)) == "Criminal" then 
           setPlayerWantedLevel ( killer, level) 
        end 
    end 
end 
addEventHandler ( "onPlayerWasted", getRootElement (), test ) 
  

Link to comment

There is an easier way!

function test ( source,killer ) 
    local level = getPlayerWantedLevel ( killer ) 
       if getTeamName(getPlayerTeam(killer)) == "Criminal" then 
         if getTeamName(getPlayerTeam(source)) == "Criminal" then 
           setPlayerWantedLevel ( killer, level - 1) 
        end 
    end 
end 
addEventHandler ( "onPlayerWasted", getRootElement (), test ) 

Link to comment

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...