Beiträge von Mr.Undercover

    stock SpielerLaden(playerid)
    {
    if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))
    {
    PlayerInfo[playerid][pLevel] = mysql_GetInt("accounts", "Level", "Name", SpielerName(playerid));
    PlayerInfo[playerid][pAdmin] = mysql_GetInt("accounts", "Admin", "Name", SpielerName(playerid));
    PlayerInfo[playerid][pGeld] = mysql_GetInt("accounts", "Geld", "Name", SpielerName(playerid));
    PlayerInfo[playerid][pFrak] = mysql_GetInt("accounts", "Frak", "Name", SpielerName(playerid));

    PlayerInfo[playerid][pMember] = mysql_GetInt("accounts", "Member", "Name", SpielerName(playerid));
    PlayerInfo[playerid][pLeader] = mysql_GetInt("accounts", "Leader", "Name", SpielerName(playerid));

    PlayerInfo[playerid][pPerso] = mysql_GetInt("accounts", "Perso", "Name", SpielerName(playerid));
    PlayerInfo[playerid][pClic] = mysql_GetInt("accounts", "Clic", "Name", SpielerName(playerid));
    PlayerInfo[playerid][pFlic] = mysql_GetInt("accounts", "Flic", "Name", SpielerName(playerid));
    PlayerInfo[playerid][pMlic] = mysql_GetInt("accounts", "Mlic", "Name", SpielerName(playerid));
    PlayerInfo[playerid][pWlic] = mysql_GetInt("accounts", "Wlic", "Name", SpielerName(playerid));
    PlayerInfo[playerid][pX] = mysql_GetFloat("accounts", "PosX", "Name", SpielerName(playerid));
    PlayerInfo[playerid][pY] = mysql_GetFloat("accounts", "PosY", "Name", SpielerName(playerid));
    PlayerInfo[playerid][pZ] = mysql_GetFloat("accounts", "PosZ", "Name", SpielerName(playerid));
    PlayerInfo[playerid][pA] = mysql_GetFloat("accounts", "PosA", "Name", SpielerName(playerid));


    SetPlayerScore(playerid,PlayerInfo[playerid][pLevel]);
    GivePlayerMoney(playerid,PlayerInfo[playerid][pGeld]);
    }
    return 1;
    }


    public OnPlayerSpawn(playerid)
    {
    SetPlayerPos(playerid,PlayerInfo[playerid][pX],PlayerInfo[playerid][pY],PlayerInfo[playerid][pZ]);
    return 1;
    }

    Hey,
    Normal sollte beim Ausloggen die Position gespeichert werden
    Nur das tut es nicht


    stock SpielerSpeichern(playerid)
    {
    if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))
    {
    if(GetPVarInt(playerid,"logged") == 1)
    {
    new query[200];
    format(query, sizeof(query), "UPDATE `accounts` SET `Level` = '%d',`Admin` = '%d',`Geld` = '%d',`Frak` = '%d',`Perso` = '%d',`Clic` = '%d',`Flic` = '%d',`Mlic` = '%d',`Wlic` = '%d' WHERE `Name` = '%s'",
    PlayerInfo[playerid][pLevel],PlayerInfo[playerid][pAdmin],PlayerInfo[playerid][pGeld],PlayerInfo[playerid][pFrak],PlayerInfo[playerid][pPerso],
    PlayerInfo[playerid][pClic],PlayerInfo[playerid][pFlic],PlayerInfo[playerid][pMlic],PlayerInfo[playerid][pWlic],SpielerName(playerid));
    mysql_query(query);

    format(query, sizeof(query), "UPDATE `accounts` SET `PosX` = '%f',`PosY` = '%f',`PosZ` = '%d',`PosA` = '%f' WHERE `Name` = '%s'",
    PlayerInfo[playerid][pX],PlayerInfo[playerid][pY],PlayerInfo[playerid][pZ],PlayerInfo[playerid][pA],SpielerName(playerid));
    mysql_query(query);
    }
    }
    return 1;
    }


    SpielerSpeichern(playerid);

    new Float:X,Float:Y,Float:Z,Float:A;
    GetPlayerPos(playerid,X,Y,Z);
    GetPlayerFacingAngle(playerid,A);
    PlayerInfo[playerid][pX] = X;
    PlayerInfo[playerid][pY] = Y;
    PlayerInfo[playerid][pZ] = Z;
    PlayerInfo[playerid][pA] = A;


    Mit Freundlichen Grüßen

    Naja,
    Wenn ihr alle kein SKILL habt und hacken müsst
    SOWAS sollte man nicht entbannen
    Besonders da man Beleidigungen
    Vermeiden kann bzw unterdrücken
    Aber hacks musst du downloaden und
    Extra machen aber beleidigungen können rausrutschen
    Wenn man stress sonstiges hat

    Hey,
    Wenn ich die account datenbank öffne kommt dieser Error
    Weiß einer was da falsch ist???



    Und
    Wenn ich mich auf dem Server einlogge
    Kommt auch wenn ich noch nicht bestehe (mein Account)
    immer das Login fenster
    Woran liegt es??


    public OnPlayerCheckAccount(playerid)
    {
    new row, field;
    cache_get_data(row,field);
    if(!row)return ShowPlayerDialog(playerid, DIALOG_REGISTER_ACCEPT, DIALOG_STYLE_MSGBOX,"Registrierung",DIALOG_REGISTER_ACCEPT_TEXT,"Weiter","Abbrechen");
    else
    {
    cache_get_field_content(0,"Password",PlayerInfo[playerid][pPassword]);
    cache_get_field_content(0,"LastLogin",PlayerInfo[playerid][pLastLogin]);
    cache_get_field_content(0,"Ban",PlayerInfo[playerid][pBan]);
    if(PlayerInfo[playerid][pBan] == 1)return Kick(playerid);
    strdel(Query,0,STR_LEN);
    strdel(ALLSTRING,0,sizeof(ALLSTRING));
    format(ALLSTRING,64,"Passworteingabe | Letzer Login: {FF8C00}%s",PlayerInfo[playerid][pLastLogin]);
    SendClientMessage(playerid,-1,"Dein Account wurde gefunden. Bitte logge dich ein.");
    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,"Login",ALLSTRING,"Anmelden","Abbrechen");
    }
    return 1;
    }
    Mit freundlichen Grüßen


    //Push

    Das war ein fertiges Anfänger mysql script
    kannst du mir helfen


    /Edit


    Der STock
    public OnPlayerCheckAccount(playerid)
    {
    new row, field;
    cache_get_data(row,field);
    if(!row)return ShowPlayerDialog(playerid, DIALOG_REGISTER_ACCEPT, DIALOG_STYLE_MSGBOX,"Registrierung",DIALOG_REGISTER_ACCEPT_TEXT,"Weiter","Abbrechen");
    else
    {
    cache_get_field_content(0,"Password",PlayerInfo[playerid][pPassword]);
    cache_get_field_content(0,"LastLogin",PlayerInfo[playerid][pLastLogin]);
    cache_get_field_content(0,"Ban",PlayerInfo[playerid][pBan]);
    if(PlayerInfo[playerid][pBan] == 1)return Kick(playerid);
    strdel(Query,0,STR_LEN);
    strdel(ALLSTRING,0,sizeof(ALLSTRING));
    format(ALLSTRING,64,"Passworteingabe | Letzer Login: {FF8C00}%s",PlayerInfo[playerid][pLastLogin]);
    SendClientMessage(playerid,-1,"Dein Account wurde gefunden. Bitte logge dich ein.");
    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,"Login",ALLSTRING,"Anmelden","Abbrechen");
    }
    return 1;
    }

    Hey,
    Irgendwie kommt wenn ich mich einlogge kein Registrier o. Login Fester
    Normaler weiße müsste nach dem Connect ein Fester kommen
    Aber momentan nicht


    public OnPlayerConnect(playerid)
    {
    strdel(Query,0,STR_LEN);
    for(new x; pStats:x < pStats; x++) PlayerInfo[playerid][pStats:x] = 0;
    GetPlayerName(playerid,PlayerInfo[playerid][pName],20);
    SendClientMessage(playerid,-1,"Willkommen auf dem Server");
    return 1;
    }


    public OnPlayerDisconnect(playerid, reason)
    {
    if(player_loged_in{playerid})
    {
    SavePlayerData(playerid);
    player_loged_in{playerid}=false;
    enter_password_try{playerid}=0;
    }
    return 1;
    }


    public OnPlayerSpawn(playerid)
    {
    if(player_loged_in{playerid}==false)return Kick(playerid);
    return 1;
    }
    public OnPlayerRequestClass(playerid, classid)
    {
    printf("Hallo3");
    TogglePlayerSpectating(playerid,1);
    SetTimerEx("LoginCamera", 100, false, "i", playerid);
    printf("Hallo1");
    return 1;
    }
    public LoginCamera(playerid)
    {
    printf("Hallo");
    SetPlayerCameraPos(playerid,-201.4289,1372.9482,67.0541);
    SetPlayerCameraLookAt(playerid,204.4058,0,0);
    mysql_format(m_connect,Query,"SELECT `Password`,`LastLogin` FROM `accounts` WHERE `Name` = '%e'",PlayerName(playerid));
    mysql_function_query(m_connect,Query,true,"OnPlayerCheckAccount","i", playerid);
    return 1;
    }


    public OnPlayerCheckAccount(playerid)
    {
    new row, field;
    cache_get_data(row,field);
    if(!row)return ShowPlayerDialog(playerid, DIALOG_REGISTER_ACCEPT, DIALOG_STYLE_MSGBOX,"Registrierung",DIALOG_REGISTER_ACCEPT_TEXT,"Weiter","Abbrechen");
    else{
    cache_get_field_content(0,"Password",PlayerInfo[playerid][pPassword]);
    cache_get_field_content(0,"LastLogin",PlayerInfo[playerid][pLastLogin]);
    cache_get_field_content(0,"Ban",PlayerInfo[playerid][pBan]);
    if(PlayerInfo[playerid][pBan] == 1)return Kick(playerid);
    strdel(Query,0,STR_LEN);
    strdel(ALLSTRING,0,sizeof(ALLSTRING));
    format(ALLSTRING,64,"Passworteingabe | Letzer Login: {FF8C00}%s",PlayerInfo[playerid][pLastLogin]);
    SendClientMessage(playerid,-1,"Dein Account wurde gefunden. Bitte logge dich ein.");
    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,"Login",ALLSTRING,"Anmelden","Abbrechen");
    }
    return 1;
    }


    Woran liegt es??
    MFG