13.01.2014, 14:32
PHP код:
stock SaveAccount(playerid) {
if(gPlayerLogged[playerid] == 1) {
CheckMySQLConnection();
new query[250],
sqlname[MAX_PLAYER_NAME],
sqlpass[64];
mysql_real_escape_string(playerVariable[playerid][Name], sqlname);
mysql_real_escape_string(playerVariable[playerid][Password], sqlpass);
format(query, sizeof(query), "UPDATE `Accounts` SET `Nickname` = '%s', `Password` = '%s', `AdminLevel` = '%d', `Vip` = '%d', `Banned` = '%d', `Muted` = '%d', `MutedTime` = '%d', `Skin` = '%d', `Score` = '%d', `Money` = '%d' WHERE `ID` = '%i'",
sqlname,
sqlpass,
playerVariable[playerid][AdminLevel],
playerVariable[playerid][Vip],
playerVariable[playerid][Banned],
playerVariable[playerid][Muted],
playerVariable[playerid][MutedTime],
playerVariable[playerid][Skin],
playerVariable[playerid][Score],
playerVariable[playerid][Money],
playerVariable[playerid][ID]);
mysql_query(query);
}
return 1;
}
Quote:
UPDATE `Accounts` SET `Nickname` = 'Privies', `Password` = '12345|1|0|0|0|0|0|0|0', `AdminLevel` = '1', `Vip` = '0', `Banned` = '0', `Muted` = '0', `MutedTime` = '0', `Skin` = '0', `Score` = '0', `Money` = '0' WHERE `ID` = '17' |
I dont have any idea why, help please