ahmedo01 Posted November 9, 2014 Posted November 9, 2014 addEventHandler( "onClientPlayerQuit", getRootElement(), function( reason ) local account = getPlayerAccount( source ) local money = getPlayerMoney( source ) local occupation = getElementData( source, "Occupation") local team = getPlayerTeam( source ) local teamname = getTeamName( team ) local x,y,z = getElementPosition( source ) local dimension = getElementDimension( source ) local interior = getElementInterior( source ) local skin = getElementModel( source ) local accountname = getAccountName( account ) if money and occupation and team and x and y and z and dimension and interior and skin and teamname then local savelocation = mysql_query(moduledb, "UPDATE 'playerlocations' SET x = '"..x.."', y = '"..y.."', z = '"..z.."' WHERE accountname = '"..accountname.."'") local saveothers = mysql_query(moduledb, "UPDATE 'playerinfo' SET money = '"..money.."', occupation = '"..occupation.."', team = '"..teamname.."', dimension = '"..dimension.."', interior = '"..interior.."', skin = '"..skin.."' WHERE accountname = '"..accountname.."'") --mysql_free_result(savelocation) --mysql_free_result(saveothers) else outputChatBox("Error! Cannot save informations!") end end ) don't update. i am using mta_mysql module
DiSaMe Posted November 9, 2014 Posted November 9, 2014 Server doesn't have such event like "onClientPlayerQuit". Use "onPlayerQuit". -
DiSaMe Posted November 9, 2014 Posted November 9, 2014 So if it gives an error, that probably means at least the function is executed. -
joaosilva099 Posted November 9, 2014 Posted November 9, 2014 Tell us exactly what/where error is... http://i.imgur.com/CSE28MJ.png Don't hesitate to contact me for anything! If I can help, I will for sure! Education is the most powerful weapon which you can use to change the world. - Castillo
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