Hello!
Maybe it is a mistake in your save-function. Can you share this function with us? - Mencent :cool: |
//------------------------------------------------------------------ //MySQL INSERT //------------------------------------------------------------------ format(rQuery, 4096, "INSERT INTO `Accounts` (`ID`, `Name`, `Password`, `IP`, `E-Mail`, `LoggedIn`, `RegisterDate`, `LastOn`, `Level`, `VIP`, `Cash`, `Score`, `Coins`, `Credits`, \ `Headshots`, `Kills`, `Deaths`, `Hours`, `Minutes`, `Seconds`, `BestKillings`, `KillingSpree`, `FavSkin`, `UseSkin`, `House`, `Property`, \ `Description1`, `Description2`, `Description3`, `Positive`, `Negative`, `ClanID`, `ClanRank`, `ClanPoints`, `ClanKills`, `ClanDeaths`,"); //------------------------------------------------------------------ format(rQuery, 4096, "%s `Kicks`, `Bans`, `Jails`, `Warns`, `ClearChats`, `ReactionTest`, `MathTest`, `Mutes`, `Jailed`, `JailTime`, `Frozen`, `FreezeTime`, `Muted`, `MuteTime`, \ `RaceScore`, `StuntScore`, `DriftScore`, `GangID`, `GangRank`, `GangSkin`, `GangKills`, `GangDeaths`, `GangWarns`, `GangCaptures`, `GangPoints`, \ `Ignores`, `LottoNumber`, `C4`, `StatsNote`, `VIPTime`, `FreeVIP`, `TempVIP`, `RLSClan`, `RLSRank`, `AdmWarns`, `VIPWarns`, `KickW`)", rQuery); //------------------------------------------------------------------ format(rQuery, 4096, "%s VALUES (0, '%s', '%s', '%s', 'changeme@etrion.ro', '1', '%02d/%02d/%02d', '%02d/%02d/%02d', \ '0', '0', '25000', '100', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '217', '1', '0', '0', \ ' ', ' ', ' ', '0', '0', '0', '0', '0', '0', '0', \ '0', '0', '0', '0', '0', '0', '0', '0', '0', '00:00', '0', '00:00', '0', '00:00', \ '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', \ '0/0/0/0', '0', '0', '0', '0', '1', '0', '0', '0', '0', '0', '0')", rQuery, PlayerName(playerid), rPassword, GetPlayerIPEx(playerid), liDay, liMonth, liYear, liDay, liMonth, liYear); //------------------------------------------------------------------ mysql_tquery(DB_Connect, rQuery, "OnAccountCreated", "i", playerid); //------------------------------------------------------------------
Check the mysql logs (in case it fails to update on disconnect or when the command is used) + use default values in those fields you know their initial value in INSERT statement. By doing that, it will reduce the query a lot.
|
If you set the admin level of the user, do you save it to the database with a UPDATE query?
|
No, nothing in your server is saving automatically. You have to save it either by a timer running every x seconds/minutes or by executing a query when an action has performed.
|
This?:
Код HTML:
//------------------------------------------------------------------ //MySQL INSERT //------------------------------------------------------------------ format(rQuery, 4096, "INSERT INTO `Accounts` (`ID`, `Name`, `Password`, `IP`, `E-Mail`, `LoggedIn`, `RegisterDate`, `LastOn`, `Level`, `VIP`, `Cash`, `Score`, `Coins`, `Credits`, \ `Headshots`, `Kills`, `Deaths`, `Hours`, `Minutes`, `Seconds`, `BestKillings`, `KillingSpree`, `FavSkin`, `UseSkin`, `House`, `Property`, \ `Description1`, `Description2`, `Description3`, `Positive`, `Negative`, `ClanID`, `ClanRank`, `ClanPoints`, `ClanKills`, `ClanDeaths`,"); //------------------------------------------------------------------ format(rQuery, 4096, "%s `Kicks`, `Bans`, `Jails`, `Warns`, `ClearChats`, `ReactionTest`, `MathTest`, `Mutes`, `Jailed`, `JailTime`, `Frozen`, `FreezeTime`, `Muted`, `MuteTime`, \ `RaceScore`, `StuntScore`, `DriftScore`, `GangID`, `GangRank`, `GangSkin`, `GangKills`, `GangDeaths`, `GangWarns`, `GangCaptures`, `GangPoints`, \ `Ignores`, `LottoNumber`, `C4`, `StatsNote`, `VIPTime`, `FreeVIP`, `TempVIP`, `RLSClan`, `RLSRank`, `AdmWarns`, `VIPWarns`, `KickW`)", rQuery); //------------------------------------------------------------------ format(rQuery, 4096, "%s VALUES (0, '%s', '%s', '%s', 'changeme@etrion.ro', '1', '%02d/%02d/%02d', '%02d/%02d/%02d', \ '0', '0', '25000', '100', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '217', '1', '0', '0', \ ' ', ' ', ' ', '0', '0', '0', '0', '0', '0', '0', \ '0', '0', '0', '0', '0', '0', '0', '0', '0', '00:00', '0', '00:00', '0', '00:00', \ '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', \ '0/0/0/0', '0', '0', '0', '0', '1', '0', '0', '0', '0', '0', '0')", rQuery, PlayerName(playerid), rPassword, GetPlayerIPEx(playerid), liDay, liMonth, liYear, liDay, liMonth, liYear); //------------------------------------------------------------------ mysql_tquery(DB_Connect, rQuery, "OnAccountCreated", "i", playerid); //------------------------------------------------------------------ |