28.06.2014, 20:00
Is there any way to make this query any shorter, tried multiple things but they didn't work either.
pawn Код:
SavePlayer(playerid)
{
if(pInfo[playerid][Logged] == 1)
{
new Query[1500];
format(Query, 1500, "UPDATE `members` SET `admin` = '%d', `score` = '%d', `money` = '%d', `exp` = '%d', `level` = '%d',`kills` = '%d', `deaths` = '%d', `weapon1` = '%d', `ammo1` = '%d', `weapon2` = '%d', `ammo2` = '%d', `weapon3` = '%d', `ammo3` = '%d', `weapon4` = '%d', `ammo4` = '%d', `weapon5` = '%d', `ammo5` = '%d', `weapon6` = '%d', `ammo6` = '%d', `weapon7` = '%d', `ammo7` = '%d', `weapon8` = '%d', `ammo8` = '%d', `weapon9` = '%d', `ammo9` = '%d', `weapon10` = '%d', `ammo10` = '%d', `weapon11` = '%d', `ammo11` = '%d', `weapon12` = '%d', `ammo12` = '%d' WHERE `id` = '%d' LIMIT 1",
pInfo[playerid][pAdmin],
pInfo[playerid][pScore],
pInfo[playerid][pMoney],
pInfo[playerid][pExp],
pInfo[playerid][pLevel],
pInfo[playerid][pKills],
pInfo[playerid][pDeaths],
pInfo[playerid][pAmmo1],
pInfo[playerid][pWeapon2],
pInfo[playerid][pAmmo2],
pInfo[playerid][pWeapon3],
pInfo[playerid][pAmmo3],
pInfo[playerid][pWeapon4],
pInfo[playerid][pAmmo4],
pInfo[playerid][pWeapon5],
pInfo[playerid][pAmmo5],
pInfo[playerid][pWeapon6],
pInfo[playerid][pAmmo6],
pInfo[playerid][pWeapon7],
pInfo[playerid][pAmmo7],
pInfo[playerid][pWeapon8],
pInfo[playerid][pAmmo8],
pInfo[playerid][pWeapon9],
pInfo[playerid][pAmmo9],
pInfo[playerid][pWeapon10],
pInfo[playerid][pAmmo10],
pInfo[playerid][pWeapon11],
pInfo[playerid][pAmmo11],
pInfo[playerid][pWeapon12],
pInfo[playerid][pAmmo12],
pInfo[playerid][ID]);
mysql_query(Query);
}
}