nasserdfdd Posted August 14, 2015 Share Posted August 14, 2015 hi all so i want if one of team criminal kill another criminal does not get wanted level any help thanks Link to comment
DNL291 Posted August 14, 2015 Share Posted August 14, 2015 onPlayerWasted getPlayerTeam -- check the player's team who got killed and the killer. Link to comment
nasserdfdd Posted August 14, 2015 Author Share Posted August 14, 2015 any example pls Link to comment
Mann56 Posted August 14, 2015 Share Posted August 14, 2015 He means, when the player dies, it will trigger the event onPlayerWasted then check if the player was in team criminal or not by using getPlayerTeam Like : function getTheKiller (killer) team = getPlayerTeam ( killer ) if team == "Criminal" then -- now we must cancel his stars else -- now here we must not cancel the stars end end addEventHandler("onPlayerWasted",root,getTheKiller) Hope it helps : > Link to comment
HUNGRY:3 Posted August 14, 2015 Share Posted August 14, 2015 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
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