Baseplate Posted June 20, 2011 Share 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 ) Link to comment
Castillo Posted June 20, 2011 Share 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 ) Link to comment
Baseplate Posted June 20, 2011 Author Share 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 Link to comment
JR10 Posted June 20, 2011 Share 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 ) Link to comment
Baseplate Posted June 21, 2011 Author Share Posted June 21, 2011 hmmm JR10 like Castillo script nothing more nothing less Link to comment
JR10 Posted June 21, 2011 Share Posted June 21, 2011 Did u edit the timer or YOU JUST COPIED IT????? Link to comment
Baseplate Posted June 21, 2011 Author Share Posted June 21, 2011 I edit it...lol and turn caps off Link to comment
JR10 Posted June 21, 2011 Share Posted June 21, 2011 Then show me the timer and show me your respawn players script. 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