Wei Posted March 23, 2012 Posted March 23, 2012 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? Diet with russian vodka, lose 3 days in one week !
Absence2 Posted March 23, 2012 Posted March 23, 2012 what exactly do you want to do with the wanted levels? getPlayerWantedLevel setPlayerWantedLevel
Wei Posted March 23, 2012 Author Posted March 23, 2012 i want to it will work only if player has wanted level Diet with russian vodka, lose 3 days in one week !
Castillo Posted March 23, 2012 Posted March 23, 2012 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) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Wei Posted March 23, 2012 Author Posted March 23, 2012 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 ! Diet with russian vodka, lose 3 days in one week !
Castillo Posted March 23, 2012 Posted March 23, 2012 You're welcome. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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