Beiträge von Fabi.StaR

    Guten Abend,


    Es liest immer nur 1 aus aber in der daten bank ist was anderes:(
    #
    hier der server log;


    Code
    ----------Loaded log file: "server_log.txt".----------SA-MP Dedicated Server----------------------v0.3z, (C)2005-2014 SA-MP Team[18:04:14] [18:04:14] Server Plugins[18:04:14] --------------[18:04:14]  Loading plugin: mysql[18:04:14]   > MySQL plugin R7 successfully loaded.[18:04:14]   Loaded.[18:04:14]  Loaded 1 plugins.[18:04:14] [18:04:14] Filterscripts[18:04:14] ---------------[18:04:14]   Loading filterscript 'gl_realtime.amx'...[18:04:14]   Unable to load filterscript 'gl_realtime.amx'.[18:04:14]   Loaded 0 filterscripts.[18:04:14] Number of vehicle models: 0[18:04:33] Incoming connection: 127.0.0.1:59835[18:04:33] [join] Fabi.StaR has joined the server (0:127.0.0.1)[18:04:51] NAME: Fabi.StaR | SQLiD: 1 | ADMIN: 1 [18:04:51] Char: 1 | Money: 1 | Score: 1


    Hier der quell code:


    Spoiler anzeigen

    public OnPlayerResponse(playerid)
    {
    new num_rows,num_fields;
    cache_get_data(num_rows,num_fields,SQLCONNECTION);
    if(num_rows == 1)
    {
    pInfo[playerid][SQLid] = cache_get_field(0,"ID",SQLCONNECTION);
    pInfo[playerid][pAdmin] = cache_get_field(0,"AdminScore",SQLCONNECTION);
    pInfo[playerid][pChar] = cache_get_field(0,"Char",SQLCONNECTION);
    pInfo[playerid][pMoney] = cache_get_field(0,"Money",SQLCONNECTION);
    pInfo[playerid][pScore] = cache_get_field(0,"Score",SQLCONNECTION);

    Spoiler anzeigen
    SetPlayerScore(playerid,pInfo[playerid][pScore]);
    GivePlayerMoney(playerid,pInfo[playerid][pMoney]);

    Spoiler anzeigen
    if(pInfo[playerid][pChar] <= 0) pInfo[playerid][pChar] = 101;

    Spoiler anzeigen
    pInfo[playerid][pLoggedin] = 1;
    SpawnPlayer(playerid);
    printf("\nNAME: %s | SQLiD: %i | ADMIN: %i ",pInfo[playerid][pName], pInfo[playerid][SQLid], pInfo[playerid][pAdmin]);
    printf("Char: %i | Money: %i | Score: %i \n",pInfo[playerid][pChar], pInfo[playerid][pMoney], pInfo[playerid][pScore]);
    return 1;
    }
    else
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Passwort Falsch!\n\nBitte gebe dein Passwort an","Einloggen","Abbrechen");
    return 1;
    }

    Guten Abend,


    Wieso funktioniert das public nicht
    ( Theard_OnPlayerResponse)



    Spoiler anzeigen

    public OnQueryFinish(query[], resultid, extraid, connectionHandle)
    {
    new num_rows,num_fields;
    cache_get_data(num_rows,num_fields);
    printf("Query with result id %d has finished! (Connection ID %d | Query: %s)",resultid,connectionHandle,query);
    switch(resultid)
    {
    case Theard_OnCheckPlayer:
    {
    if(num_rows)
    {
    ShowPlayerDialog(extraid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Bitte gebe dein Passwort an","Einloggen","Abbrechen");
    }
    else
    {
    ShowPlayerDialog(extraid,DIALOG_REGISTER,DIALOG_STYLE_PASSWORD,"Registrierung","Bitte gebe dein Passwort an","Weiter","Abbrechen");
    }
    return 1;
    }
    case Theard_OnPlayerResponse:
    {
    if(num_rows != 0)
    {
    pInfo[extraid][pAdmin] = cache_get_field(0,"AdminScore");
    pInfo[extraid][SQLid] = cache_get_field(0,"ID");
    pInfo[extraid][pChar] = cache_get_field(0,"Char");

    setPlayerMoney(extraid,cache_get_field(0,"Money"),0);
    setPlayerScore(extraid,cache_get_field(0,"Score"));

    if(pInfo[extraid][pChar] == 0)
    {
    pInfo[extraid][pChar] = 101;
    }

    pInfo[extraid][pLoggedin] = 1;
    SpawnPlayer(extraid);
    return 1;
    }
    else
    {
    ShowPlayerDialog(resultid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Passwort Falsch!\n\nBitte gebe dein Passwort an","Einloggen","Abbrechen");
    }
    return 1;
    }
    default:
    {
    }
    }
    return 1;
    }


    mysql log:


    Code
    [17:08:18] >> mysql_connect(127.0.0.1, root, selfmade::samp, ******) on port 3306[17:08:18] CMySQLHandler::CMySQLHandler() - constructor called.[17:08:18] CMySQLHandler::CMySQLHandler() - Connecting to "127.0.0.1" | DB: "selfmade::samp" | Username: "root"[17:08:18] CMySQLHandler::Connect() - Connection was successful.[17:08:18] CMySQLHandler::Connect() - Auto-Reconnect has been enabled.[17:08:48] >> mysql_query_callback( Connection handle: 1 )[17:08:48] Passing query SELECT `User` FROM `accounts_main` WHERE `User`='Fabi.StaR' | sii[17:08:48] ProcessQueryThread(OnQueryFinish) - Query was successful. (SELECT `User` FROM `accounts_main` WHERE `User`='Fabi.StaR')[17:08:48] ProcessQueryThread(OnQueryFinish) - Data caching enabled.[17:08:48] CMySQLHandler::StoreResult() - Result was stored.[17:08:48] CMySQLHandler::FreeResult() - Result was successfully free'd.[17:08:48] CMySQLHandler::ProcessQueryThread() - Data is getting passed to ->ProcessTick()[17:08:48] OnQueryFinish(sii) - Threaded function called.[17:08:48] >> cache_get_data( Connection handle: 1 )[17:08:48] ProcessTick() - The cache has been cleared.[17:08:51] >> mysql_query_callback( Connection handle: 1 )[17:08:51] Passing query SELECT * FROM `accounts_main` VALUES `User`='Fabi.StaR' AND `Password`=md5('23021997') LIMIT 1 | sdi[17:08:51] CMySQLHandler::ProcessQueryThread() - Error will be triggered to OnQueryError()

    mach es so:


    if(strcmp(cmd, "/noooc", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if (PlayerInfo[playerid][pAdmin] >= 5 && (!noooc))
    {
    noooc = 1;
    BroadCast(COLOR_GRAD2, "Der öffentliche Chat wurde eingeschaltet.");
    return 1;
    }
    else if (PlayerInfo[playerid][pAdmin] >= 5 && (noooc))
    {
    noooc = 0;
    BroadCast(COLOR_GRAD2, "Der öffentliche Chat wurde ausgeschaltet.");
    return 1;
    }
    else
    return SendClientMessage(playerid, COLOR_GRAD1, " Tu das Lieber nicht!");
    }
    return 1;
    }

    @Trixury


    Sorry aber wenn du schon so anfängst brauchst du ja keine Hilfe, denkst auch bist der beste oder?


    Dann close das diesen beitrag und mach es alleine wenn du kein Hilfe willst warum machst du dann über haupt ein Beitrag?!


    Mit freundlichen Grüßen.


    Fabi.StaR :cursing:



    #Vote 4 Close

    Ich gebe dir mal ein Tipp:


    Such dir ein Admin-Team setzt euch zsm. und überlegt schreib dir die wichtigsten Sachen auf und Sätze es um.


    Und wenn das Grund - Script soweit fertig ist mach Open Alpha und die User werden dir dann weiter helfen sofern sie eine Idee habe.


    Mit freundlichen Grüßen,


    Fabi.StaR ;)

    Es konnt keine verbindung zu MYSQL DATEN bank hergestellt werden.


    überprüf mal 109.230.231.143 die ip des host