nasserdfdd Posted September 5, 2015 Share Posted September 5, 2015 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
JR10 Posted September 5, 2015 Share Posted September 5, 2015 Because the wanted level would have already been changed. You need to edit the part where you increment the wanted level. Link to comment
HUNGRY:3 Posted September 5, 2015 Share Posted September 5, 2015 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
JR10 Posted September 5, 2015 Share Posted September 5, 2015 If the other script doesn't increment the wanted level for whatever reason, then the wanted level will be decremented. 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