SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

Thread Tools Display Modes
Old 17/11/2009, 06:11 PM   #1
Huge Clucker
Join Date: May 2009
Posts: 216
Reputation: 0
Default MySQL Saving ON gmx


Currently on my mysql TDM server. Players are losing their cars and their stats on a restart. Could I make like a SavePlayers(); and SaveVehicles(); under OnGameModeExit. Currently I have this:

pawn Code:
public SavePlayer(playerid)
    new query[512];
    format(query,sizeof(query),"UPDATE `players` SET rank=%d,reborn=%d,exp=%d,van=%d,kills=%d,tkills=%d,gkill=%d,mp5kill=%d,kkill=%d,mgoal=%d,hgoal=%d,agoal=%d,mapgoal=%d,deaths=%d,admin=%d,gm=%d,premium=%d,money=%d WHERE playerid=%d",
      PlayerInfo[playerid][pKnucklekill],PlayerInfo[playerid][pMenugoal],PlayerInfo[playerid][pHeligoal],PlayerInfo[playerid]         [pArmourgoal],PlayerInfo[playerid][pMapgoal],PlayerInfo[playerid][pDeaths],PlayerInfo[playerid][pAdmin],
    return 1;


pawn Code:
public SaveVehicle(vehid)
    new query[256];
    format(query,sizeof(query),"UPDATE `vehicles` SET model=%d,x=%f,y=%f,z=%f,a=%f,col1=%d,col2=%d,type=%d,price=%d,ownerid=%d WHERE vehid=%d",
    return 1;

Can anyone help me make a fucntion to save all players stats and vehicles on a restart?
jamesb93 is offline  

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
MySql Saving IP? BurrodaZero Help Archive 0 22/05/2010 01:22 PM
saving ip in mysql database swredder Help Archive 2 12/05/2010 06:42 PM
Saving IP addresses in mysql JeroenGFX Help Archive 0 03/05/2010 06:06 PM
mysql saving prob WardenCS Help Archive 1 17/04/2010 07:37 PM
mysql score saving. ajwar Help Archive 2 26/01/2010 02:00 PM

All times are GMT. The time now is 12:36 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.