26.01.2014, 14:31
[php]]public Savestats(playerid)
{
GetPlayerHealth(playerid, Playerinfo[playerid][pHP]);
GetPlayerArmour(playerid, Playerinfo[playerid][pArmor]);
Playerinfo[playerid][pMoney] = GetPlayerCash(playerid);
Playerinfo[playerid][pSkin] = GetPlayerSkin(playerid);
GetPlayerPos(playerid, Playerinfo[playerid][pPosX], Playerinfo[playerid][pPosY], Playerinfo[playerid][pPosZ]);
format(Query, sizeof(Query), "UPDATE account SET `AdminLevel` = '%d', `Money` = '%d', `HP` = '%f', `Armor` = '%f', `Skin` = '%d', `RPTest` = '%d', `Kate1` = '%d', `Kate2` = '%d', `Kate3` = '%d', `PosX` = '%f', `PosY` = '%f', `PosZ` = '%f', `Fraction` = '%d', `FractionRank` = '%d', `Hospital` = '%d', `Age` = '%d', `Bank` = '%d', `Phone` = '%d', `PhoneNumber` = '%d', `UV` = '%d', `BankPin` = '%i', `IsOnHospital` = '%d' WHERE `Name` = '%s'",
Playerinfo[playerid][pAdminLevel],
Playerinfo[playerid][pMoney],
Playerinfo[playerid]
{
GetPlayerHealth(playerid, Playerinfo[playerid][pHP]);
GetPlayerArmour(playerid, Playerinfo[playerid][pArmor]);
Playerinfo[playerid][pMoney] = GetPlayerCash(playerid);
Playerinfo[playerid][pSkin] = GetPlayerSkin(playerid);
GetPlayerPos(playerid, Playerinfo[playerid][pPosX], Playerinfo[playerid][pPosY], Playerinfo[playerid][pPosZ]);
format(Query, sizeof(Query), "UPDATE account SET `AdminLevel` = '%d', `Money` = '%d', `HP` = '%f', `Armor` = '%f', `Skin` = '%d', `RPTest` = '%d', `Kate1` = '%d', `Kate2` = '%d', `Kate3` = '%d', `PosX` = '%f', `PosY` = '%f', `PosZ` = '%f', `Fraction` = '%d', `FractionRank` = '%d', `Hospital` = '%d', `Age` = '%d', `Bank` = '%d', `Phone` = '%d', `PhoneNumber` = '%d', `UV` = '%d', `BankPin` = '%i', `IsOnHospital` = '%d' WHERE `Name` = '%s'",
Playerinfo[playerid][pAdminLevel],
Playerinfo[playerid][pMoney],
Playerinfo[playerid]
PHP код:
,
Playerinfo[playerid][pArmor],
Playerinfo[playerid][pSkin],
Playerinfo[playerid][pRPTest],
Playerinfo[playerid][pKate1],
Playerinfo[playerid][pKate2],
Playerinfo[playerid][pKate3],
Playerinfo[playerid][pPosX],
Playerinfo[playerid][pPosY],
Playerinfo[playerid][pPosZ],
Playerinfo[playerid][pFraction],
Playerinfo[playerid][pFractionRank],
Playerinfo[playerid][pHospital],
Playerinfo[playerid][pAge],
Playerinfo[playerid][pBank],
Playerinfo[playerid][pPhone],
Playerinfo[playerid][pPhoneNumber],
Playerinfo[playerid][pUV],
Playerinfo[playerid][pBankPin],
Playerinfo[playerid][pIsOnHospital],
GetEscName(playerid));
mysql_query(Query);
format(Query, sizeof(Query), "UPDATE account SET `Jobs` = '%d' WHERE `Name` = '%s'",
Playerinfo[playerid][pJob],
GetEscName(playerid));
mysql_query(Query);
return 1;
}