29.12.2014, 20:18
PHP код:
stock SaveAccount(playerid)
{
if(gPlayerLogged[playerid] == true)
{
new query[600] ="UPDATE `accounts` SET ";
strcat(query, "`level` = '%d',\
`respect` = '%d',\
`money` = '%d',\
`bankmoney` = '%d',\
`phone` = '%d',\
`skin` = '%d' ");
strcat(query, "`phonebalance` = '%d',\
`member` = '%d',\
`leader` = '%d',\
`rank` = '%d',\
`mskin` = '%d',\
`satiety` = '%d' ");
strcat(query,"WHERE `id` = '%d'");
format(query, sizeof(query), query,
PlayerInfo[playerid][pLevel],
PlayerInfo[playerid][pRespect],
PlayerInfo[playerid][pMoney],
PlayerInfo[playerid][pBankMoney],
PlayerInfo[playerid][pPhone],
PlayerInfo[playerid][pSkin],
PlayerInfo[playerid][pPhoneBalance],
PlayerInfo[playerid][pMember],
PlayerInfo[playerid][pLeader],
PlayerInfo[playerid][pRank],
PlayerInfo[playerid][pMSkin],
PlayerInfo[playerid][pSatiety],
PlayerInfo[playerid][pID]);
mysql_function_query(dbHandle, query, false, "", "" );
return true;
}
return false;
}