28.05.2012, 15:09
Quote:
А так:
Code:
PlayerInfo[playerid][pEmail][0] = EOS; strcat(PlayerInfo[playerid][pEmail], inputtext); |
PHP Code:
stock SaveAccount1(playerid)
{ // Сохранение аккаунта.
if(PlayerInfo[playerid][pLogged] == true)
{ // Проверка, если аккаунт авторизован.
CheckMySQLConnection(); // Проверяем, подключена ли БД.
new query[800], sqlname[MAX_PLAYER_NAME], sqlpass[64], string[800];
new origin = PlayerInfo[playerid][pOrigin];
new house = PlayerInfo[playerid][pHouse];
new autos = PlayerInfo[playerid][pAuto];
new timer = PlayerInfo[playerid][pTime];
new exp = PlayerInfo[playerid][pExp];
new chas = PlayerInfo[playerid][pChas];
new bank = PlayerInfo[playerid][pBank];
new bizz = PlayerInfo[playerid][pBizz];
new sex = PlayerInfo[playerid][pSex];
new zvezdi = PlayerInfo[playerid][pZvezdi];
new timezv = PlayerInfo[playerid][pTimeZv];
new jailed = PlayerInfo[playerid][pJailed];
new jtime = PlayerInfo[playerid][pJailTime];
new pmail = PlayerInfo[playerid][pEmail];
mysql_real_escape_string(PlayerInfo[playerid][pName], sqlname);
mysql_real_escape_string(PlayerInfo[playerid][pPassword], sqlpass);
strcat(string,"UPDATE `Accounts` SET `Origin` = '%i', `House` = '%i', `Auto` = '%i', `Time` = '%i', `Exp` = '%i', `Chas` = '%i'",sizeof(string));
strcat(string,", `Bank` = '%i', `Bizz` = '%i', `Sex` = '%i', `Zvezdi` = '%i', `TimeZv` = '%i', `Jailed` = '%i', `JailTime` = '%i', `Mail` = '%s' WHERE `ID` = '%i'",sizeof(string));
format(query, sizeof(query),string,origin,house,autos,timer,exp,chas,bank,bizz,sex,zvezdi,timezv,jailed,jtime,pmail,PlayerInfo[playerid][pID]);
mysql_debug(1);
mysql_query(query); // Отправляем запрос
}
return 1;
}