MySQL scripts
#3

Quote:
Originally Posted by [DK
AzaxYo ]
yeah there is a difference on saving system. Here is an example of a mysql server and normal saving stat system.

Normal
pawn Код:
format(var, 32, "RacingLosses=%d\n",PlayerInfo[playerid][pRaceLosses]);fwrite(hFile, var);
MySQL
pawn Код:
new query[MAX_STRING];
format(query, MAX_STRING, "UPDATE players SET ");
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "RacingWins", PlayerInfo[playerid][pRaceWins]);
MySQLUpdateFinish(query, PlayerInfo[playerid][pSQLID]);
This is just an example. There are a lot of differences. If you want to see them you can try the Moderntopia GM
that isnt standart mysql script, you can do it however you want, this is just a random script that uses 3 things to save something, you only need the query and samp_mysql_query, for the file you need the 'query' too and than fwrite. BUT the advantage with mysql is that you can organize the users easy and you can edit them very easy, most files (that i did) wouldn't work after one edit.
Reply


Messages In This Thread
MySQL scripts - by Qeux - 09.05.2009, 04:14
Re: MySQL scripts - by Dark_Kostas - 09.05.2009, 06:44
Re: MySQL scripts - by Think - 09.05.2009, 09:16
Re: MySQL scripts - by MenaceX^ - 09.05.2009, 09:21
Re: MySQL scripts - by Qeux - 09.05.2009, 16:39
Re: MySQL scripts - by Ignas1337 - 27.06.2009, 16:05

Forum Jump:


Users browsing this thread: 1 Guest(s)