Baseplate Posted June 20, 2011 Posted June 20, 2011 well I have this script of wanted level it works fine but when I die my stars get deleted here is the code function wanted( ammo, attacker, weapon, bodypart ) setPlayerWantedLevel ( attacker, getPlayerWantedLevel( attacker )+1 ) end addEventHandler ( "onPlayerWasted", getRootElement(), wanted )
Castillo Posted June 20, 2011 Posted June 20, 2011 Try this: function wanted( ammo, attacker, weapon, bodypart ) if (attacker) and (attacker ~=source) then setPlayerWantedLevel ( attacker, getPlayerWantedLevel( attacker )+1 ) else local wanted = getPlayerWantedLevel( source ) setPlayerWantedLevel(source,wanted) end end addEventHandler ( "onPlayerWasted", getRootElement(), wanted )
Baseplate Posted June 20, 2011 Author Posted June 20, 2011 well it dosen't work when I got killed my stars get removed and when I kill someone it add a new wanted star
JR10 Posted June 20, 2011 Posted June 20, 2011 Maybe try this: function wanted( ammo, attacker, weapon, bodypart ) if (attacker) and (attacker ~=source) then setPlayerWantedLevel ( attacker, getPlayerWantedLevel( attacker )+1 ) else local wanted = getPlayerWantedLevel( source ) setTimer(setPlayerWantedLevel, 1000, 1, source, wanted) --1000 is 1 sec and it should be the time taken to spawn you should specify this yourself end end addEventHandler ( "onPlayerWasted", getRootElement(), wanted )
Baseplate Posted June 21, 2011 Author Posted June 21, 2011 hmmm JR10 like Castillo script nothing more nothing less
JR10 Posted June 21, 2011 Posted June 21, 2011 Then show me the timer and show me your respawn players script.
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