Jump to content

setwantedlvl not working any help


nasserdfdd

Recommended Posts

Posted

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 ) 
  

Posted

Because the wanted level would have already been changed. You need to edit the part where you increment the wanted level.

Posted

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 ) 

Posted

If the other script doesn't increment the wanted level for whatever reason, then the wanted level will be decremented.

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