addEventHandler ( 'onResourceStop' , resourceRoot ,
function ( )
local XmlSave = xmlCreateFile ( 'Xml-Files/Players-Money.xml' , 'root' )
exports [ 'Useful-Functions' ]:outputMessage ( false , 'De-Bug' , '[Money System] : ( Players-Money.xml ) Created' , 0 , 255 , 0 , 3 )
if ( XmlSave ) then
local NewChild = xmlCreateChild ( XmlSave , 'Save' )
xmlNodeSetAttribute ( NewChild , 'Table' , toJSON ( Settings [ 'Table' ] [ 'Money' ] ) )
xmlSaveFile ( XmlSave )
end
end
)
Hi,
when resource stopped, xml created and saved.
but when server shutdown nothing saved !
so, how i can do the save of xml even the server is shutting down?