17.06.2014, 20:45
pawn Код:
enum MainAccount
{
mID,
mPassword[20],
mEmailAddress[25],
mCurrentCID,
mRealName[128],
bool:mLoggedIn,
mSuperAdmin,
mSecretPhrase[28],
mOriginalUsername[MAX_PLAYER_NAME],
mOld_IP[20],
mCharacterString[128],
}
new MasterAccount[MAX_PLAYERS][MainAccount];
I have a function already, I do not think it resets the MySQL Variables though. it uses "srtmid".
pawn Код:
forward ResetMasterAccountVariables(playerid); // Resetting variables upon connection.
public ResetMasterAccountVariables(playerid)
{
strmid(MasterAccount[playerid][mPassword], "", 128, 128);
strmid(MasterAccount[playerid][mEmailAddress], "", 128, 128);
MasterAccount[playerid][mCurrentCID] = -1; // 0 = no character in use.
MasterAccount[playerid][mID] = 0;
strmid(MasterAccount[playerid][mRealName], "", 128, 128);
MasterAccount[playerid][mSuperAdmin] = 0;
strmid(MasterAccount[playerid][mSecretPhrase], "", 128, 128);
strmid(MasterAccount[playerid][mOriginalUsername], "", 128, 128);
strmid(MasterAccount[playerid][mOld_IP], "", 128, 128);
MasterAccount[playerid][mLoggedIn] = false;
}