Jorgito'Molina Posted April 9, 2013 Share 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. Link to comment
TheIceman1 Posted April 9, 2013 Share 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) Link to comment
Jorgito'Molina Posted April 9, 2013 Author Share Posted April 9, 2013 not works, sorry. Link to comment
iPrestege Posted April 9, 2013 Share 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) Link to comment
Jorgito'Molina Posted April 9, 2013 Author Share Posted April 9, 2013 (edited) who, working Thanks you Mr.Pres[T]ege, and TheIceman1 for you help. Edited April 9, 2013 by Guest Link to comment
PhantomDamn Posted January 28, 2014 Share Posted January 28, 2014 it not works... chatbox is ok, but no reset score... Link to comment
iPrestege Posted January 28, 2014 Share Posted January 28, 2014 What? Show us ur code. Link to comment
Castillo Posted January 28, 2014 Share Posted January 28, 2014 Maybe your account data names ain't "kills" and "deaths"? Link to comment
Jorgito'Molina Posted January 28, 2014 Author Share Posted January 28, 2014 not, all good. please close post. 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