exports.scoreboard:scoreboardAddColumn( "score" )
function xcore ()
zcore = getElementData ( source, "score" ) or 0
setElementData ( source, "score", zcore + 5 )
end
addEvent("onPlayerWasted",true)
addEventHandler("onPlayerWasted",getRootElement(),xcore)
addEventHandler ( 'onPlayerQuit', root,
function ( )
local account = getPlayerAccount ( source )
local getScore = getElementData ( source, 'score' ) or 0
if ( account ) and not ( isGuestAccount ( account ) ) then
setAccountData ( account, 'scoreSave', getScore )
end
end
)
addEventHandler ( 'onPlayerLogin', root,
function ( _, account )
if ( account ) then
local scoreLoad = getAccountData ( account, 'scoreSave' )
if ( scoreLoad ) then
setElementData ( source, 'score', scoreLoad )
end
end
end
)