Hi all i tree make new script for save score but don't work, Thx for all help
This is my lua
addEventHandler ( "onPlayerLogin", root,
function( thePreviousAccount, theCurrentAccount, autoLogin )
setAccountData( account,"score",tonumber( getAccountData( account,"score" ) ) )
setElementData( Player, "score", tonumber( getAccountData( account,"score" ) ) )
source, "score") ) )
end
else
local accountSource = getPlayerAccount ( source )
setElementData( source, "score", tonumber( getAccountData( accountSource,"score" ) ) )
end
)
addEventHandler( "onPlayerQuit",root,
local account = getPlayerAccount ( source )
if not getAccountData( account,"score" ) and not getAccountData( account,"score" )
end
setElementData( source,"score",tonumber( getAccountData( account,"score" ) ) )
source, "score") )
end
)
addEventHandler( "onResourceStart",resourceRoot,
function( )
outputDebugString( "add score to scoreboard Return: "..tostring(
call( getResourceFromName("Scoreboard"), "addScoreboardColumn", "score",root,2, 0.032 )
) )
end
)