Jorgito'Molina Posted April 9, 2013 Posted April 9, 2013 function resetPlayerScore (thePlayer) local pname = getPlayerAccount( killer) setElementData(thePlayer,"kills",0) setElementData(thePlayer,"deaths",0) setAccountData( account, "kills", 0) setAccountData( account, "deaths", 0) local playerAccount = getPlayerAccount ( source ) outputChatBox(tostring(pname) .." YOU SCORE KILL/DEATHS IS 0", getRootElement(), 255, 0, 0, true ) end addCommandHandler("resetscore", resetPlayerScore) problem in setAccountData, not delete score of account help.
TheIceman1 Posted April 9, 2013 Posted April 9, 2013 Try this: function resetPlayerScore (thePlayer) local pname = getPlayerAccount( thePlayer ) setElementData(thePlayer,"kills",0) setElementData(thePlayer,"deaths",0) setAccountData( pname, "kills", 0) setAccountData( pname, "deaths", 0) outputChatBox(pname.." YOU SCORE KILL/DEATHS IS 0", getRootElement(), 255, 0, 0, true ) end addCommandHandler("resetscore", resetPlayerScore) Need paid scripter just pm me i will accept every job!
TheIceman1 Posted April 9, 2013 Posted April 9, 2013 Errors? Need paid scripter just pm me i will accept every job!
iPrestege Posted April 9, 2013 Posted April 9, 2013 function resetPlayerScore (thePlayer) local pname = getPlayerAccount( thePlayer ) setElementData(thePlayer,"kills",0) setElementData(thePlayer,"deaths",0) setAccountData( pname, "kills", 0) setAccountData( pname, "deaths", 0) outputChatBox(" "..getPlayerName(thePlayer).." : YOU SCORE KILL/DEATHS IS 0", getRootElement(), 255, 0, 0, true ) end addCommandHandler("resetscore", resetPlayerScore)
Jorgito'Molina Posted April 9, 2013 Author Posted April 9, 2013 (edited) who, working Thanks you Mr.Pres[T]ege, and TheIceman1 for you help. Edited April 9, 2013 by Guest
TheIceman1 Posted April 9, 2013 Posted April 9, 2013 You're welcome! Need paid scripter just pm me i will accept every job!
PhantomDamn Posted January 28, 2014 Posted January 28, 2014 it not works... chatbox is ok, but no reset score... |El Sabio no tiene intereses propios, hace suyos los intereses del pueblo| (scripting= -20%)
Castillo Posted January 28, 2014 Posted January 28, 2014 Maybe your account data names ain't "kills" and "deaths"? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Jorgito'Molina Posted January 28, 2014 Author Posted January 28, 2014 not, all good. please close post.
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