Jump to content

policejob help


Wei

Recommended Posts

function policeJob ( attacker, attackerweapon, bodypart, loss ) 
    theSkin = getElementModel ( attacker )  
    if (attackerweapon == 3) and (loss > 2 ) and (theSkin == 281 ) then 
        setElementPosition (source, 219, 110, 999, true) 
        setTimer ( setElementPosition, 100000, 1, source, 236.32, 110.4, 1003.2) 
        takePlayerMoney (source, 50) 
        givePlayerMoney (attacker, 100) 
  end 
end 
addEventHandler ("onPlayerDamage", getRootElement(), policeJob) 

how to add here if player wanted level is 1,2,3,4,5,6?

Link to comment
function policeJob ( attacker, attackerweapon, bodypart, loss ) 
    local theSkin = getElementModel ( attacker ) 
    local wanted = getPlayerWantedLevel ( source ) 
    if ( attackerweapon == 3 ) and ( loss > 2 ) and ( theSkin == 281 ) and ( wanted > 0 ) then 
        setElementPosition (source, 219, 110, 999, true) 
        setTimer ( setElementPosition, 100000, 1, source, 236.32, 110.4, 1003.2) 
        takePlayerMoney (source, 50) 
        givePlayerMoney (attacker, 100) 
    end 
end 
addEventHandler ("onPlayerDamage", getRootElement(), policeJob) 

Link to comment
function policeJob ( attacker, attackerweapon, bodypart, loss ) 
    local theSkin = getElementModel ( attacker ) 
    local wanted = getPlayerWantedLevel ( source ) 
    if ( attackerweapon == 3 ) and ( loss > 2 ) and ( theSkin == 281 ) and ( wanted > 0 ) then 
        setElementPosition (source, 219, 110, 999, true) 
        setTimer ( setElementPosition, 100000, 1, source, 236.32, 110.4, 1003.2) 
        takePlayerMoney (source, 50) 
        givePlayerMoney (attacker, 100) 
    end 
end 
addEventHandler ("onPlayerDamage", getRootElement(), policeJob) 

Thank you very much !

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