Erfahenden Scripter für 10 - 15 Minuten [BELOHNUNG]

  • Zitat

    Poste doch einfach den Code vom Speichern und Laden?
    Kann es sein, das der Gamemode nicht mit MySQL verbunden ist? Überprüfe mal deine MySQL Daten.


    Das Script ist mit der Datenbank verbunden.


    SaveAccount:



    stock SavePlayer(playerid)
    {
    if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))
    {
    if(Spieler[playerid][Eingeloggt] == 1)
    {
    mysql_SetInt("accounts", "Level", Spieler[playerid][Level], "Name", Spieler[playerid][pName]);
    mysql_SetInt("accounts", "Admin", Spieler[playerid][Admin], "Name", Spieler[playerid][pName]);
    mysql_SetInt("accounts", "Eingeloggt", Spieler[playerid][Eingeloggt], "Name", Spieler[playerid][pName]);
    mysql_SetInt("accounts", "Tut", Spieler[playerid][Tut], "Name", Spieler[playerid][pName]);
    mysql_SetInt("accounts", "Geschlecht", Spieler[playerid][Geschlecht], "Name", Spieler[playerid][pName]);
    mysql_SetInt("accounts", "Skin", Spieler[playerid][Skin], "Name", Spieler[playerid][pName]);
    mysql_SetInt("accounts", "Premium", Spieler[playerid][Premium], "Name", Spieler[playerid][pName]);
    mysql_SetInt("accounts", "Money", Spieler[playerid][Money], "Name", Spieler[playerid][pName]);
    mysql_SetInt("accounts", "Bank", Spieler[playerid][Bank], "Name", Spieler[playerid][pName]);
    mysql_SetInt("accounts", "Kills", Spieler[playerid][Kills], "Name", Spieler[playerid][pName]);
    mysql_SetInt("accounts", "Tode", Spieler[playerid][Tode], "Name", Spieler[playerid][pName]);
    mysql_SetFloat("accounts", "Health", Spieler[playerid][Health], "Name", Spieler[playerid][pName]);
    mysql_SetInt("accounts", "Spawnchange", Spieler[playerid][Spawnchange], "Name", Spieler[playerid][pName]);
    }
    }
    return 1;
    }

    LoadAccount:



    stock LoadPlayer(playerid)
    {
    if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))
    {
    GetPlayerName(playerid, Spieler[playerid][pName], MAX_PLAYER_NAME);
    Spieler[playerid][Level] = mysql_GetInt("accounts", "Level", "Name", Spieler[playerid][pName]);
    Spieler[playerid][Admin] = mysql_GetInt("accounts", "Admin", "Name", Spieler[playerid][pName]);
    Spieler[playerid][Eingeloggt] = mysql_GetInt("accounts", "Eingeloggt", "Name", Spieler[playerid][pName]);
    Spieler[playerid][Tut] = mysql_GetInt("accounts", "Tut", "Name", Spieler[playerid][pName]);
    Spieler[playerid][Geschlecht] = mysql_GetInt("accounts", "Geschlecht", "Name", Spieler[playerid][pName]);
    Spieler[playerid][Skin] = mysql_GetInt("accounts", "Skin", "Name", Spieler[playerid][pName]);
    Spieler[playerid][Premium] = mysql_GetInt("accounts", "Premium", "Name", Spieler[playerid][pName]);
    Spieler[playerid][Money] = mysql_GetInt("accounts", "Money", "Name", Spieler[playerid][pName]);
    Spieler[playerid][Bank] = mysql_GetInt("accounts", "Bank", "Name", Spieler[playerid][pName]);
    Spieler[playerid][Kills] = mysql_GetInt("accounts", "Kills", "Name", Spieler[playerid][pName]);
    Spieler[playerid][Tode] = mysql_GetInt("accounts", "Tode", "Name", Spieler[playerid][pName]);
    Spieler[playerid][Spawnchange] = mysql_GetInt("accounts", "Spawnchange", "Name", Spieler[playerid][pName]);
    }
    return 1;
    }


    Mfg

  • Schreib mal unter OnGameModeInit folgendes: mysql_debug(1);


    Und dann connecte mal auf den Server und verlass ihn wieder. Dann muss im Server Ordner eine Datei Namens Mysql_log stehen (glaube die heißt so). Und dann postest du uns mal das Resultat hier.

  • Zitat

    Schreib mal unter OnGameModeInit folgendes: mysql_debug(1);


    Und dann connecte mal auf den Server und verlass ihn wieder. Dann muss im Server Ordner eine Datei Namens Mysql_log stehen (glaube die heißt so). Und dann postest du uns mal das Resultat hier.

    Spoiler anzeigen
    [02:43:50]
    [02:43:50] ---------------------------
    [02:43:50] MySQL Debugging activated (05/12/13)
    [02:43:50] ---------------------------
    [02:43:50]
    [02:43:50] >> mysql_connect( )
    [02:43:50] CMySQLHandler::CMySQLHandler() - constructor called.
    [02:43:50] CMySQLHandler::CMySQLHandler() - Connecting to "localhost" | DB: "samp2207_LC" | Username: "samp2207" ...
    [02:43:50] CMySQLHandler::Connect() - Connection was successful.
    [02:43:50] CMySQLHandler::Connect() - Auto-Reconnect has been enabled.
    [02:43:50] >> mysql_ping( Connection handle: 1 )
    [02:43:50] CMySQLHandler::Ping() - Connection is still alive.
    [02:44:17] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:17] CMySQLHandler::EscapeString(Yumex4355); - Escaped 9 characters to Yumex4355.
    [02:44:17] >> mysql_query( Connection handle: 1 )
    [02:44:17] CMySQLHandler::Query(SELECT * FROM accounts WHERE Name = 'Yumex4355') - Successfully executed.
    [02:44:17] >> mysql_store_result( Connection handle: 1 )
    [02:44:17] CMySQLHandler::StoreResult() - Result was stored.
    [02:44:17] >> mysql_num_rows( Connection handle: 1 )
    [02:44:17] CMySQLHandler::NumRows() - Returned 0 row(s)
    [02:44:26] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:26] CMySQLHandler::EscapeString(Yumex4355); - Escaped 9 characters to Yumex4355.
    [02:44:26] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:26] CMySQLHandler::EscapeString(test123); - Escaped 7 characters to test123.
    [02:44:26] >> mysql_query( Connection handle: 1 )
    [02:44:26] CMySQLHandler::Query(INSERT INTO accounts (Name, Passwort) VALUES ('Yumex4355', 'test123')) - Successfully executed.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(accounts); - Escaped 8 characters to accounts.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(Level); - Escaped 5 characters to Level.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(); - Escaped 0 characters to .
    [02:44:38] >> mysql_query( Connection handle: 1 )
    [02:44:38] CMySQLHandler::Query(UPDATE accounts SET Level = '0' WHERE Name = '') - Successfully executed.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(accounts); - Escaped 8 characters to accounts.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(Admin); - Escaped 5 characters to Admin.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(); - Escaped 0 characters to .
    [02:44:38] >> mysql_query( Connection handle: 1 )
    [02:44:38] CMySQLHandler::Query(UPDATE accounts SET Admin = '0' WHERE Name = '') - Successfully executed.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(accounts); - Escaped 8 characters to accounts.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(Eingeloggt); - Escaped 10 characters to Eingeloggt.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(); - Escaped 0 characters to .
    [02:44:38] >> mysql_query( Connection handle: 1 )
    [02:44:38] CMySQLHandler::Query(UPDATE accounts SET Eingeloggt = '1' WHERE Name = '') - Successfully executed.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(accounts); - Escaped 8 characters to accounts.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(Tut); - Escaped 3 characters to Tut.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(); - Escaped 0 characters to .
    [02:44:38] >> mysql_query( Connection handle: 1 )
    [02:44:38] CMySQLHandler::Query(UPDATE accounts SET Tut = '0' WHERE Name = '') - Successfully executed.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(accounts); - Escaped 8 characters to accounts.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(Geschlecht); - Escaped 10 characters to Geschlecht.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(); - Escaped 0 characters to .
    [02:44:38] >> mysql_query( Connection handle: 1 )
    [02:44:38] CMySQLHandler::Query(UPDATE accounts SET Geschlecht = '2' WHERE Name = '') - Successfully executed.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(accounts); - Escaped 8 characters to accounts.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(Skin); - Escaped 4 characters to Skin.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(); - Escaped 0 characters to .
    [02:44:38] >> mysql_query( Connection handle: 1 )
    [02:44:38] CMySQLHandler::Query(UPDATE accounts SET Skin = '7' WHERE Name = '') - Successfully executed.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(accounts); - Escaped 8 characters to accounts.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(Premium); - Escaped 7 characters to Premium.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(); - Escaped 0 characters to .
    [02:44:38] >> mysql_query( Connection handle: 1 )
    [02:44:38] CMySQLHandler::Query(UPDATE accounts SET Premium = '0' WHERE Name = '') - Successfully executed.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(accounts); - Escaped 8 characters to accounts.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(Money); - Escaped 5 characters to Money.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(); - Escaped 0 characters to .
    [02:44:38] >> mysql_query( Connection handle: 1 )
    [02:44:38] CMySQLHandler::Query(UPDATE accounts SET Money = '10000' WHERE Name = '') - Successfully executed.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(accounts); - Escaped 8 characters to accounts.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(Bank); - Escaped 4 characters to Bank.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(); - Escaped 0 characters to .
    [02:44:38] >> mysql_query( Connection handle: 1 )
    [02:44:38] CMySQLHandler::Query(UPDATE accounts SET Bank = '11000' WHERE Name = '') - Successfully executed.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(accounts); - Escaped 8 characters to accounts.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(Kills); - Escaped 5 characters to Kills.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(); - Escaped 0 characters to .
    [02:44:38] >> mysql_query( Connection handle: 1 )
    [02:44:38] CMySQLHandler::Query(UPDATE accounts SET Kills = '0' WHERE Name = '') - Successfully executed.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(accounts); - Escaped 8 characters to accounts.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(Tode); - Escaped 4 characters to Tode.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(); - Escaped 0 characters to .
    [02:44:38] >> mysql_query( Connection handle: 1 )
    [02:44:38] CMySQLHandler::Query(UPDATE accounts SET Tode = '0' WHERE Name = '') - Successfully executed.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(accounts); - Escaped 8 characters to accounts.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(Health); - Escaped 6 characters to Health.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(); - Escaped 0 characters to .
    [02:44:38] >> mysql_query( Connection handle: 1 )
    [02:44:38] CMySQLHandler::Query(UPDATE accounts SET Health = '0.0' WHERE Name = '') - Successfully executed.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(accounts); - Escaped 8 characters to accounts.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(Spawnchange); - Escaped 11 characters to Spawnchange.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.
    [02:44:38] >> mysql_real_escape_string( Connection handle: 1 )
    [02:44:38] CMySQLHandler::EscapeString(); - Escaped 0 characters to .
    [02:44:38] >> mysql_query( Connection handle: 1 )
    [02:44:38] CMySQLHandler::Query(UPDATE accounts SET Spawnchange = '0' WHERE Name = '') - Successfully executed.