Resetting RegID Samp MySQl
#1

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,
Reply
#2

Empty the table and execute this once:
pawn Код:
ALTER TABLE table_name AUTO_INCREMENT = 1
Reply
#3

And that does the job.. Thanks alot..
+2 rep.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)