Jump to content
  • 0

Problema MySQL


BoBBiTa

Question

Problema intalnita (descriere): Salut, SA-MP.RO ! M-am apucat de MySQL acum cateva zile ca am inteles ca e cel mai bun la momentul actual . Asa ca am urmat tutorialul lui WiDuAlK.SaMp . 
Ero(area / rile) / warning-(ul / urile): Problema este ca se salveaza parola decat in baza de date. Practic cand intri inapoi pe server, scrii ce parola vrei si te logheaza automat. 
Liniile de cod / sursa / script-ul(obligatoriu): Tutorialul lui WiDuAIK.SAMP ( https://www.sa-mp.ro/forums/topic/20364-tutorial-registerlogin-mysql-r39/ ) .
Imagini / Video (optional):
Ati incercat sa rezolvati singur?: Am incercat sa casc bine ochii pe tutorial, am dat si copy -> paste, insa niciun efect. 

// Desenul meu animat 
// Alte episoade aici: 
https://www.youtube.com/channel/UCF2kY1CzhHI_PCyV5LprQ1w/videos

 

 

 

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Mister

Salut, poftim : 

if(dialogid == DIALOG_LOGIN)
    {
    if(!response)return Kick(playerid);
    if(response)
    {
    if(!strlen(inputtext))return SPD(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "{C0FF00}Inregistrare", "{FFFFFF}Nu ai completat cu nici o parola!", "Inregistrare", "Iesire");
    mysql_format(handle, query, sizeof(query), "SELECT * FROM `conturi` WHERE `Nume`='%e' AND `Parola` = '%e'", GetName(playerid),inputtext);
    mysql_tquery(handle, query, "OnLogin", "i", playerid);
    }
    }

 

// Desenul meu animat 
// Alte episoade aici: 
https://www.youtube.com/channel/UCF2kY1CzhHI_PCyV5LprQ1w/videos

 

 

 

Link to comment
Share on other sites

  • 0

Incearca asa

 

    if(dialogid == DIALOG_LOGIN)
    {
        if(!response) return Kick(playerid);
        if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "{C0FF00}Inregistrare", "{FFFFFF}Nu ai completat cu nici o parola!", "Inregistrare", "Iesire");
        new name[18]; 
        GetPlayerName(playerid,name,sizeof(name));
        format(query, sizeof(query),"SELECT * FROM `conturi` WHERE `Nume`='%e' AND `Parola` = '%e'",name,inputtext);
        mysql_tquery(handle, query, "OnLogin", "i", playerid);
    }

 

Edited by Mister

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

  • 0
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.