14.12.2013, 22:12
pawn Код:
stock SavePlayer(playerid)
{
new Query[1000], logstring[100];
PlayerInfo[pid][pSkin] = GetPlayerSkin(pid);
PlayerInfo[pid][pCash] = GetPlayerMoney(pid);
PlayerInfo[pid][pLevel] = GetPlayerScore(pid);
PlayerInfo[pid][pName] = GetName(pid);
format(Query, sizeof(Query), "UPDATE ACCOUNTS SET PASSWORD = '%s', CASH = %d, NAME = '%s', ADMIN = %d, DEV = %d, HELPER = %d, VIP = %d, LEVEL = %d, XPOS = %4f, YPOS = %4f, ZPOS = %4f, NUMBER = %d, PTIME = %d, BANNED = %d, SEX = %d, TUT = %d, FACTION = %d, FACLEVEL = %d, FACRANK = '%s', PAYCHECK = %d, PAYDAY = %d, HOURS = %d, JAILED = %d, MASK = %d, JOB = %d, LICENSE = %d, CARKEY = %d, CARKEY2 = %d, CARKEY3 = %d, GUNLICENSE = %d, ARRESTED = %d, WALKIE = %d, BANREASON = '%s', GASCAN = %d, BANADMIN = '%s', BANDATE = '%s', SKIN = %d WHERE ID = %d",
PlayerInfo[pid][pPassword], PlayerInfo[pid][pCash], PlayerInfo[pid][pName], PlayerInfo[pid][pAdmin], PlayerInfo[pid][pDev], PlayerInfo[pid][pHelper], PlayerInfo[pid][pVIP], PlayerInfo[pid][pLevel], PlayerInfo[pid][pPos_x], PlayerInfo[pid][pPos_y], PlayerInfo[pid][pPos_z], PlayerInfo[pid][pPnumber], PlayerInfo[pid][pCelltime], PlayerInfo[pid][pBanned], PlayerInfo[pid][pSex],
PlayerInfo[pid][pTut], PlayerInfo[pid][pFaction], PlayerInfo[pid][pFLevel], PlayerInfo[pid][pFRank], PlayerInfo[pid][pPaycheck], PlayerInfo[pid][pPayday],
PlayerInfo[pid][pHours], PlayerInfo[pid][pJailed], PlayerInfo[pid][pMask], PlayerInfo[pid][pJob], PlayerInfo[pid][pDrivLic], PlayerInfo[pid][pID],
PlayerInfo[pid][pCarkey], PlayerInfo[pid][pCarkey2], PlayerInfo[pid][pCarkey3], PlayerInfo[pid][pGunLic], PlayerInfo[pid][pArrested], PlayerInfo[pid][pWalkie], PlayerInfo[pid][pBanReason], PlayerInfo[pid][pGasCan], PlayerInfo[pid][pBanAdmin], PlayerInfo[pid][pBanDate], PlayerInfo[pid][pSkin], PlayerInfo[pid][pID]);
db_query(gamemode, Query);
format(logstring, sizeof(logstring), "%s's info saved.", GetName(pid));
print(logstring);
print(Query);
return 1;
}