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 ) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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 ) Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
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 Did u edit the timer or YOU JUST COPIED IT????? Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
JR10 Posted June 21, 2011 Posted June 21, 2011 Then show me the timer and show me your respawn players script. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
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