21.03.2009, 00:33
pawn Код:
forward MySQLConnect(sqlhost[], sqluser[], sqlpass[], sqldb[]);
forward MySQLDisconnect();
forward MySQLCheckConnection();
forward MySQLUpdateBuild(query[], sqlplayerid);
forward MySQLUpdateFinish(query[], sqlplayerid);
forward MySQLUpdatePlayerInt(query[], sqlplayerid, sqlvalname[], sqlupdateint);
forward MySQLUpdatePlayerIntSingle(sqlplayerid, sqlvalname[], sqlupdateint);
forward MySQLUpdatePlayerFlo(query[], sqlplayerid, sqlvalname[], Float:sqlupdateflo);
forward MySQLUpdatePlayerStr(query[], sqlplayerid, sqlvalname[], sqlupdatestr[]);
forward MySQLCheckAccount(sqlplayersname[]);
forward MySQLCheckAccountLocked(sqlplayerid);
forward MySQLCheckIPBanned(ip[]);
forward MySQLFetchAcctSingle(sqlplayerid, sqlvalname[], sqlresult[]);
forward MySQLFetchAcctRecord(sqlplayerid, sqlresult[]);
forward MySQLCreateAccount(newplayersname[], newpassword[]);
forward MySQLAddLoginRecord(sqlplayerid, ipaddr[]);
pawn Код:
public MySQLConnect(sqlhost[], sqluser[], sqlpass[], sqldb[])
{
print("MYSQL: Attempting to connect to server...");
samp_mysql_connect(sqlhost, sqluser, sqlpass);
samp_mysql_select_db(sqldb);
if(samp_mysql_ping()==0)
{
print("MYSQL: Database connection established.");
return 1;
}
else
{
print("MYSQL: Connection error, retrying...");
samp_mysql_connect(sqlhost, sqluser, sqlpass);
samp_mysql_select_db(sqldb);
if(samp_mysql_ping()==0)
{
print("MYSQL: Reconnection successful. We can continue as normal.");
return 1;
}
else
{
print("MYSQL: Could not reconnect to server, terminating server...");
SendRconCommand("exit");
return 0;
}
}
}
public MySQLDisconnect()
{
samp_mysql_close();
return 1;
}
public MySQLCheckConnection()
{
if(samp_mysql_ping()==0)
{
return 1;
}
else
{
print("MYSQL: Connection seems dead, retrying...");
MySQLDisconnect();
MySQLConnect(MYSQL_HOST,MYSQL_USER,MYSQL_PASS,MYSQL_DB);
if(samp_mysql_ping()==0)
{
print("MYSQL: Reconnection successful. We can continue as normal.");
return 1;
}
else
{
print("MYSQL: Could not reconnect to server, terminating server...");
SendRconCommand("exit");
return 0;
}
}
}
public MySQLUpdateBuild(query[], sqlplayerid)
{
new querylen = strlen(query);
new querymax = MAX_STRING;
if (querylen < 1) format(query, querymax, "UPDATE players SET ");
else if (querymax-querylen < 50)
{
new whereclause[32];
format(whereclause, sizeof(whereclause), " WHERE id=%d", sqlplayerid);
strcat(query, whereclause, querymax);
samp_mysql_query(query);
format(query, querymax, "UPDATE players SET ");
}
else if (strfind(query, "=", true) != -1) strcat(query, ",", MAX_STRING);
return 1;
}
public MySQLUpdateFinish(query[], sqlplayerid)
{
if (strcmp(query, "WHERE id=", false) == 0) samp_mysql_query(query);
else
{
new whereclause[32];
format(whereclause, sizeof(whereclause), " WHERE id=%d", sqlplayerid);
strcat(query, whereclause, MAX_STRING);
samp_mysql_query(query);
format(query, MAX_STRING, "UPDATE players SET ");
}
return 1;
}
public MySQLUpdatePlayerInt(query[], sqlplayerid, sqlvalname[], sqlupdateint)
{
MySQLUpdateBuild(query, sqlplayerid);
new updval[64];
format(updval, sizeof(updval), "%s=%d", sqlvalname, sqlupdateint);
strcat(query, updval, MAX_STRING);
return 1;
}
public MySQLUpdatePlayerFlo(query[], sqlplayerid, sqlvalname[], Float:sqlupdateflo)
{
new flotostr[32];
format(flotostr, sizeof(flotostr), "%f", sqlupdateflo);
MySQLUpdatePlayerStr(query, sqlplayerid, sqlvalname, flotostr);
return 1;
}
public MySQLUpdatePlayerStr(query[], sqlplayerid, sqlvalname[], sqlupdatestr[])
{
MySQLUpdateBuild(query, sqlplayerid);
new escstr[128];
new updval[128];
samp_mysql_real_escape_string(sqlupdatestr, escstr);
format(updval, sizeof(updval), "%s='%s'", sqlvalname, escstr);
strcat(query, updval, MAX_STRING);
return 1;
}
public MySQLUpdatePlayerIntSingle(sqlplayerid, sqlvalname[], sqlupdateint)
{
new query[128];
format(query, sizeof(query), "UPDATE players SET %s=%d WHERE id=%d", sqlvalname, sqlupdateint, sqlplayerid);
samp_mysql_query(query);
return 1;
}
public MySQLCheckAccount(sqlplayersname[])
{
new query[128];
new escstr[MAX_PLAYER_NAME];
samp_mysql_real_escape_string(sqlplayersname, escstr);
format(query, sizeof(query), "SELECT id FROM players WHERE LOWER(Name) = LOWER('%s') LIMIT 1", escstr);
samp_mysql_query(query);
samp_mysql_store_result();
if (samp_mysql_num_rows()==0)
{
return 0;
}
else
{
new strid[32];
new intid;
samp_mysql_fetch_row(strid);
intid = strval(strid);
return intid;
}
}
public MySQLCheckAccountLocked(sqlplayerid)
{
new query[64];
new lockedboolstr[4];
format(query, sizeof(query), "SELECT Locked FROM players WHERE id = %d LIMIT 1", sqlplayerid);
samp_mysql_query(query);
samp_mysql_store_result();
samp_mysql_fetch_row(lockedboolstr);
if (strval(lockedboolstr) != 0)
{
return 1;
}
return 0;
}
public MySQLCheckIPBanned(ip[])
{
new query[64];
format(query, sizeof(query), "SELECT type FROM bans WHERE ip = '%s' AND inactive = 0 ORDER BY id DESC LIMIT 1", ip);
samp_mysql_query(query);
samp_mysql_store_result();
if (samp_mysql_num_rows() != 0)
{
new bantypestr[4];
new bantypeint;
samp_mysql_fetch_row(bantypestr);
bantypeint = strval(bantypestr);
samp_mysql_free_result();
return bantypeint;
}
return 0;
}
public MySQLFetchAcctSingle(sqlplayerid, sqlvalname[], sqlresult[])
{
new query[128];
format(query, sizeof(query), "SELECT %s FROM players WHERE id = %d LIMIT 1", sqlvalname, sqlplayerid);
samp_mysql_query(query);
samp_mysql_store_result();
if(samp_mysql_fetch_row(sqlresult)==1)
{
return 1;
}
return 0;
}
public MySQLFetchAcctRecord(sqlplayerid, sqlresult[])
{
new query[64];
format(query, sizeof(query), "SELECT * FROM players WHERE id = %d LIMIT 1", sqlplayerid);
samp_mysql_query(query);
samp_mysql_store_result();
if(samp_mysql_fetch_row(sqlresult)==1)
{
return 1;
}
return 0;
}
public MySQLCreateAccount(newplayersname[], newpassword[])
{
new query[128];
new sqlplyname[64];
new sqlpassword[64];
samp_mysql_real_escape_string(newplayersname, sqlplyname);
samp_mysql_real_escape_string(newpassword, sqlpassword);
format(query, sizeof(query), "INSERT INTO players (Name, Password) VALUES ('%s', '%s')", sqlplyname, sqlpassword);
samp_mysql_query(query);
new newplayersid = MySQLCheckAccount(newplayersname);
if (newplayersid != 0)
{
return newplayersid;
}
return 0;
}
public MySQLAddLoginRecord(sqlplayerid, ipaddr[])
{
new query[128];
new escip[16];
samp_mysql_real_escape_string(ipaddr, escip);
format(query, sizeof(query), "INSERT INTO logins (time,ip,userid) VALUES (UNIX_TIMESTAMP(),'%s',%d)", escip, sqlplayerid);
samp_mysql_query(query);
return 1;
}
pawn Код:
public OnPlayerUpdate(playerid)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid])
{
MySQLCheckConnection();
new query[MAX_STRING];
format(query, MAX_STRING, "UPDATE players SET ");
MySQLUpdatePlayerStr(query, PlayerInfo[playerid][pSQLID], "Password", PlayerInfo[playerid][pKey]);
PlayerInfo[playerid][pCash] = GetPlayerCash(playerid);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Level", PlayerInfo[playerid][pLevel]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "AdminLevel", PlayerInfo[playerid][pAdmin]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "DonateRank", PlayerInfo[playerid][pDonateRank]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "UpgradePoints", PlayerInfo[playerid][gPupgrade]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "ConnectedTime", PlayerInfo[playerid][pConnectTime]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Registered", PlayerInfo[playerid][pReg]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Sex", PlayerInfo[playerid][pSex]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Age", PlayerInfo[playerid][pAge]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Origin", PlayerInfo[playerid][pOrigin]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "CK", PlayerInfo[playerid][pCK]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Muted", PlayerInfo[playerid][pMuted]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Respect", PlayerInfo[playerid][pExp]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Money", PlayerInfo[playerid][pCash]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Bank", PlayerInfo[playerid][pAccount]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Crimes", PlayerInfo[playerid][pCrimes]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Kills", PlayerInfo[playerid][pKills]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Deaths", PlayerInfo[playerid][pDeaths]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Arrested", PlayerInfo[playerid][pArrested]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "WantedDeaths", PlayerInfo[playerid][pWantedDeaths]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Phonebook", PlayerInfo[playerid][pPhoneBook]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "LottoNr", PlayerInfo[playerid][pLottoNr]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Fishes", PlayerInfo[playerid][pFishes]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "BiggestFish", PlayerInfo[playerid][pBiggestFish]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Job", PlayerInfo[playerid][pJob]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Paycheck", PlayerInfo[playerid][pPayCheck]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "HeadValue", PlayerInfo[playerid][pHeadValue]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Jailed", PlayerInfo[playerid][pJailed]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "JailTime", PlayerInfo[playerid][pJailTime]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "UsedDrugs", PlayerInfo[playerid][pUsedDrugs]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "DrugTime", PlayerInfo[playerid][pDrugTimes]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Materials", PlayerInfo[playerid][pMats]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Rope", PlayerInfo[playerid][pRope]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "VirtualWorld", PlayerInfo[playerid][pVirtualWorld]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Drugs", PlayerInfo[playerid][pDrugs]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "SafeMats", PlayerInfo[playerid][pBoxMats]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "SafeDrugs", PlayerInfo[playerid][pBoxDrugs]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Leader", PlayerInfo[playerid][pLeader]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Member", PlayerInfo[playerid][pMember]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "FMember", PlayerInfo[playerid][pFMember]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Rank", PlayerInfo[playerid][pRank]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Char", PlayerInfo[playerid][pChar]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "ContractTime", PlayerInfo[playerid][pContractTime]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "DetSkill", PlayerInfo[playerid][pDetSkill]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "SexSkill", PlayerInfo[playerid][pSexSkill]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "BoxSkill", PlayerInfo[playerid][pBoxSkill]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "LawSkill", PlayerInfo[playerid][pLawSkill]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "MechSkill", PlayerInfo[playerid][pMechSkill]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "JackSkill", PlayerInfo[playerid][pJackSkill]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "CarSkill", PlayerInfo[playerid][pCarSkill]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "NewsSkill", PlayerInfo[playerid][pNewsSkill]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "DrugsSkill", PlayerInfo[playerid][pDrugsSkill]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "CookSkill", PlayerInfo[playerid][pCookSkill]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "FishSkill", PlayerInfo[playerid][pFishSkill]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "BusSkill", PlayerInfo[playerid][pBusSkill]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "TaxiSkill", PlayerInfo[playerid][pTaxiSkill]);
MySQLUpdatePlayerFlo(query, PlayerInfo[playerid][pSQLID], "pSHealth", PlayerInfo[playerid][pSHealth]);
GetPlayerHealth(playerid,PlayerInfo[playerid][pHealth]);
MySQLUpdatePlayerFlo(query, PlayerInfo[playerid][pSQLID], "pHealth", PlayerInfo[playerid][pHealth]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Int", PlayerInfo[playerid][pInt]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Local", PlayerInfo[playerid][pLocal]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Team", PlayerInfo[playerid][pTeam]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Model", PlayerInfo[playerid][pModel]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "PhoneNr", PlayerInfo[playerid][pPnumber]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "House", PlayerInfo[playerid][pPhousekey]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Bizz", PlayerInfo[playerid][pPbiskey]);
if ((PlayerInfo[playerid][pPos_x]==0.0 && PlayerInfo[playerid][pPos_y]==0.0 && PlayerInfo[playerid][pPos_z]==0.0))
{
PlayerInfo[playerid][pPos_x] = 1684.9;
PlayerInfo[playerid][pPos_y] = -2244.5;
PlayerInfo[playerid][pPos_z] = 13.5;
}
if(Spectate[playerid] != 255)
{
PlayerInfo[playerid][pPos_x] = Unspec[playerid][sPx];
PlayerInfo[playerid][pPos_y] = Unspec[playerid][sPy];
PlayerInfo[playerid][pPos_z] = Unspec[playerid][sPz];
PlayerInfo[playerid][pInt] = Unspec[playerid][sPint];
PlayerInfo[playerid][pLocal] = Unspec[playerid][sLocal];
}
MySQLUpdatePlayerFlo(query, PlayerInfo[playerid][pSQLID], "Pos_x", PlayerInfo[playerid][pPos_x]);
MySQLUpdatePlayerFlo(query, PlayerInfo[playerid][pSQLID], "Pos_y", PlayerInfo[playerid][pPos_y]);
MySQLUpdatePlayerFlo(query, PlayerInfo[playerid][pSQLID], "Pos_z", PlayerInfo[playerid][pPos_z]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "CarLic", PlayerInfo[playerid][pCarLic]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "FlyLic", PlayerInfo[playerid][pFlyLic]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "BoatLic", PlayerInfo[playerid][pBoatLic]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "FishLic", PlayerInfo[playerid][pFishLic]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "GunLic", PlayerInfo[playerid][pGunLic]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Gun1", PlayerInfo[playerid][pGun1]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Gun2", PlayerInfo[playerid][pGun2]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Gun3", PlayerInfo[playerid][pGun3]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Gun4", PlayerInfo[playerid][pGun4]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Ammo1", PlayerInfo[playerid][pAmmo1]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Ammo2", PlayerInfo[playerid][pAmmo2]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Ammo3", PlayerInfo[playerid][pAmmo3]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Ammo4", PlayerInfo[playerid][pAmmo4]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "CarTime", PlayerInfo[playerid][pCarTime]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "PayDay", PlayerInfo[playerid][pPayDay]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "PayDayHad", PlayerInfo[playerid][pPayDayHad]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "CDPlayer", PlayerInfo[playerid][pCDPlayer]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Wins", PlayerInfo[playerid][pWins]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Loses", PlayerInfo[playerid][pLoses]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "AlcoholPerk", PlayerInfo[playerid][pAlcoholPerk]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "DrugPerk", PlayerInfo[playerid][pDrugPerk]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "MiserPerk", PlayerInfo[playerid][pMiserPerk]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "PainPerk", PlayerInfo[playerid][pPainPerk]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "TraderPerk", PlayerInfo[playerid][pTraderPerk]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Tutorial", PlayerInfo[playerid][pTut]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Mission", PlayerInfo[playerid][pMissionNr]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Warnings", PlayerInfo[playerid][pWarns]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Adjustable", PlayerInfo[playerid][pAdjustable]);
if(PlayerInfo[playerid][pDonateRank] < 1) { PlayerInfo[playerid][pFuel] = 0; }
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Fuel", PlayerInfo[playerid][pFuel]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Married", PlayerInfo[playerid][pMarried]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "MarriedTo=%s\n", PlayerInfo[playerid][pMarriedTo]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Locked", PlayerInfo[playerid][pLocked]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "FishTool", PlayerInfo[playerid][pFishTool]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Mask", PlayerInfo[playerid][pMask]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "SafeBox", PlayerInfo[playerid][pVault]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "CargoGet", PlayerInfo[playerid][pCargoGet]);
MySQLUpdateFinish(query, PlayerInfo[playerid][pSQLID]);
}
}
return 1;
}