Jump to content

help in script


nasserdfdd

Recommended Posts

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

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