Yeah but i can't get the Element Data..
function onQuit ()
if getElementData(localPlayer,"LoggedIN") == true then
outputChatBox("GetElementData Successfull")
local x,y,z = getElementPosition (source)
local inserting = dbExec ( connect, "INSERT INTO accounts ( money,skin,health,x,y,z,int,dim ) VALUES (?,?,?,?,?,?,?,? )",tostring (getPlayerMoney (source)),tostring (getPedSkin (source)),tostring (getElementHealth (source)),x,y,z,getElementInterior (source),getElementDimension (source) )
if inserting then
outputChatBox("Inserting successfull")
else
outputChatBox("Inserting failed.")
end
end
end
addEventHandler ("onPlayerQuit", root, onQuit)
addCommandHandler("test", onQuit)