Hallo,
wie oben bereits steht speichert MySQL nur mein Name und Passwort nach Register.
Wenn ich mir z.B. Geld setze speichert er das nicht. Wenn ich mich töten lasse ändert sich in der Datenbank auch nichts. Dazu muss man aber sagen das er die IP speichert und lädt.
[23:11:25] [DEBUG] mysql_format - connection: 1, len: 256, format: "SELECT id FROM accounts WHERE name = '%e'"[23:11:25] [DEBUG] mysql_pquery - connection: 1, query: "SELECT id FROM accounts WHERE name = 'TaigX'", callback: "OnUserCheck2", format: "d"[23:11:25] [DEBUG] CMySQLQuery::Execute[OnUserCheck2] - starting query execution[23:11:25] [DEBUG] CMySQLQuery::Execute[OnUserCheck2] - query was successfully executed within 0.431 milliseconds[23:11:25] [DEBUG] CMySQLResult::CMySQLResult() - constructor called[23:11:25] [DEBUG] Calling callback "OnUserCheck2"..[23:11:25] [DEBUG] cache_get_data - connection: 1[23:11:25] [DEBUG] mysql_format - connection: 1, len: 256, format: "SELECT * FROM accounts WHERE name = '%e' AND password = MD5('%e')"[23:11:25] [DEBUG] mysql_pquery - connection: 1, query: "SELECT * FROM accounts WHERE name = 'TaigX' AND password = MD5('", callback: "OnUserLogin", format: "d"[23:11:25] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called[23:11:25] [DEBUG] CMySQLQuery::Execute[OnUserLogin] - starting query execution[23:11:25] [DEBUG] CMySQLQuery::Execute[OnUserLogin] - query was successfully executed within 0.336 milliseconds[23:11:25] [DEBUG] CMySQLResult::CMySQLResult() - constructor called[23:11:25] [DEBUG] Calling callback "OnUserLogin"..[23:11:25] [DEBUG] cache_get_row_count - connection: 1[23:11:25] [DEBUG] cache_get_field_content_int - row: 0, field_name: "id", connection: 1[23:11:25] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "id", data: "2"[23:11:25] [DEBUG] cache_get_field_content_int - row: 0, field_name: "level", connection: 1[23:11:25] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "level", data: "0"[23:11:25] [DEBUG] cache_get_field_content_int - row: 0, field_name: "money", connection: 1[23:11:25] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "money", data: "0"[23:11:25] [DEBUG] cache_get_field_content_int - row: 0, field_name: "kills", connection: 1[23:11:25] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "kills", data: "0"[23:11:25] [DEBUG] cache_get_field_content_int - row: 0, field_name: "deaths", connection: 1[23:11:25] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "deaths", data: "0"[23:11:25] [DEBUG] cache_get_field_content_int - row: 0, field_name: "admin", connection: 1[23:11:25] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "admin", data: "5"[23:11:25] [DEBUG] cache_get_field_content_int - row: 0, field_name: "ip", connection: 1[23:11:25] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "ip", data: "127.0.0.1"[23:11:25] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called[23:12:02] [DEBUG] mysql_format - connection: 1, len: 256, format: "UPDATE accounts SET level = '%d', money = '%d', kills = '%d', deaths = '%d', admin = '%d', ip = '%d' WHERE id = '%d'"[23:12:02] [DEBUG] mysql_pquery - connection: 1, query: "UPDATE accounts SET level = '0', money = '0', kills = '0', death", callback: "(null)", format: "(null)"[23:12:02] [DEBUG] CMySQLQuery::Execute[] - starting query execution[23:12:02] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 0.310 milliseconds[23:12:02] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving
stock SavePlayer(playerid){ new query[256]; mysql_format(db_handle, query, sizeof(query), "UPDATE accounts SET level = '%d', money = '%d', kills = '%d', deaths = '%d', admin = '%d', ip = '%d' WHERE id = '%d'", PlayerInfo[playerid][plevel], PlayerInfo[playerid][pmoney], PlayerInfo[playerid][pkills], PlayerInfo[playerid][pdeaths], PlayerInfo[playerid][pid], PlayerInfo[playerid][padmin], PlayerInfo[playerid][pip]); mysql_pquery(db_handle, query); return 1;}
Und unter OnPlayerDisconnect hab ich halt SavePlayer(playerid);
Datenbank im Anhang.
Bitte um Hilfe
MfG
Zreeq