Resetting RegID Samp MySQl - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Resetting RegID Samp MySQl (
/showthread.php?tid=617785)
Resetting RegID Samp MySQl -
SsHady - 26.09.2016
So basically, the .sql I imported to my Registeration systems mysql db was kinda empty, It had all the tables but no values in it. However, When a person registered, instead of showing 0 as his RegID, it shows the 10,000th account, from where I left off. Same is the case with houses. There is no house in the db, so a newly created house should have a ID of 0, however it shows 714 which was the last time.
Код:
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
format(str, sizeof str, ""RED_E"[SG] {%06x}%s(%i) "GREEN_E"has registered, making the server have a total of "LB2_E"%s "GREEN_E"players registered.", pColor[playerid], PlayerName, playerid, ToCurrency(pRegID[playerid]));
SendClientMessageToAll(COLOR_GREEN, str);
RegisteredPlayers = pRegID[playerid];
Код:
ToCurrency(cCash)
{
new szStr[16];
format(szStr, sizeof(szStr), "%i", cCash);
for(new iLen = strlen(szStr) - 3; iLen > 0; iLen -= 3)
{
strins(szStr, ",", iLen);
}
return szStr;
}
So, I'm literally out of ideas, on how can I freshly start from 0 ID for both houses and players.
Cheers,
Re: Resetting RegID Samp MySQl -
Konstantinos - 26.09.2016
Empty the table and execute this once:
pawn Код:
ALTER TABLE table_name AUTO_INCREMENT = 1
Re: Resetting RegID Samp MySQl -
SsHady - 26.09.2016
And that does the job.. Thanks alot..
+2 rep.