[POMOC] mysql login i register

Započeo [VA]|...MihaeL...|, Oktobar 09, 2012, 17:56:02 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: Ficin RP
Detaljan opis problema: Pa tjeo sam testat taj mod i nemogu se registrirat, koji god Nick da upisem izbaci mi login i kaze da je acc pronadjen
Dio skripte: imate dole OnPlayerConnect i dialog registera
Neke slike/video za lakse dobivanje pomoci(neobavezno):

public OnPlayerConnect(playerid)
{
//----------------------------------BENZA 2-------------------------------------------------
RemoveBuildingForPlayer(playerid, 17535, 2364.0547, -1391.5313, 41.3516, 0.25);
RemoveBuildingForPlayer(playerid, 1525, 2346.5156, -1350.7813, 24.2813, 0.25);
RemoveBuildingForPlayer(playerid, 17964, 2337.3359, -1330.8516, 25.7109, 0.25);
RemoveBuildingForPlayer(playerid, 17965, 2322.2813, -1355.1953, 25.4063, 0.25);
RemoveBuildingForPlayer(playerid, 17966, 2347.9219, -1364.2891, 27.1563, 0.25);
RemoveBuildingForPlayer(playerid, 1261, 2356.3906, -1313.9922, 39.6953, 0.25);
RemoveBuildingForPlayer(playerid, 1266, 2317.5859, -1355.8281, 37.2188, 0.25);
RemoveBuildingForPlayer(playerid, 17970, 2364.0547, -1391.5313, 41.3516, 0.25);
RemoveBuildingForPlayer(playerid, 1297, 2317.3594, -1379.5234, 26.2266, 0.25);
RemoveBuildingForPlayer(playerid, 1297, 2344.9219, -1379.5234, 26.2266, 0.25);
RemoveBuildingForPlayer(playerid, 1308, 2331.4453, -1373.5313, 23.0938, 0.25);
RemoveBuildingForPlayer(playerid, 17504, 2378.6719, -1455.2578, 26.7422, 0.25);
RemoveBuildingForPlayer(playerid, 17543, 2322.2813, -1355.1953, 25.4063, 0.25);
RemoveBuildingForPlayer(playerid, 1260, 2317.5938, -1355.8203, 37.2266, 0.25);
RemoveBuildingForPlayer(playerid, 620, 2336.9844, -1350.5781, 22.7266, 0.25);
RemoveBuildingForPlayer(playerid, 17544, 2337.3359, -1330.8516, 25.7109, 0.25);
RemoveBuildingForPlayer(playerid, 620, 2338.9141, -1336.4766, 22.7266, 0.25);
RemoveBuildingForPlayer(playerid, 17542, 2347.9219, -1364.2891, 27.1563, 0.25);
RemoveBuildingForPlayer(playerid, 955, 2352.1797, -1357.1563, 23.7734, 0.25);
RemoveBuildingForPlayer(playerid, 1267, 2356.3906, -1313.9922, 39.6953, 0.25);
//--------------------------------BENZA 1--------------------------------------------------
    RemoveBuildingForPlayer(playerid, 1412, 1917.3203, -1797.4219, 13.8125, 0.25);
RemoveBuildingForPlayer(playerid, 1412, 1912.0547, -1797.4219, 13.8125, 0.25);
RemoveBuildingForPlayer(playerid, 1412, 1906.7734, -1797.4219, 13.8125, 0.25);
RemoveBuildingForPlayer(playerid, 1412, 1927.8516, -1797.4219, 13.8125, 0.25);
RemoveBuildingForPlayer(playerid, 1412, 1922.5859, -1797.4219, 13.8125, 0.25);
RemoveBuildingForPlayer(playerid, 1412, 1938.3906, -1797.4219, 13.8125, 0.25);
RemoveBuildingForPlayer(playerid, 1412, 1933.1250, -1797.4219, 13.8125, 0.25);
RemoveBuildingForPlayer(playerid, 1412, 1951.6094, -1821.1250, 13.8125, 0.25);
RemoveBuildingForPlayer(playerid, 1412, 1951.6094, -1815.8594, 13.8125, 0.25);
RemoveBuildingForPlayer(playerid, 1412, 1951.6094, -1810.5938, 13.8125, 0.25);
RemoveBuildingForPlayer(playerid, 1412, 1951.6094, -1805.3281, 13.8125, 0.25);
RemoveBuildingForPlayer(playerid, 1412, 1948.9844, -1797.4219, 13.8125, 0.25);
RemoveBuildingForPlayer(playerid, 1412, 1943.6875, -1797.4219, 13.8125, 0.25);
RemoveBuildingForPlayer(playerid, 1412, 1951.6094, -1800.0625, 13.8125, 0.25);
    SetPlayerMapIcon(playerid, 1, -382.9774,-1426.3179,26.3192, 52, 0,1);
    SetPlayerMapIcon(playerid, 2, 1775.2229,-1705.8451,13.5234, 52, 0,1);
   
SendClientMessage(playerid,0x80FF00FF,"[BCAC]:Dobrodošli na Ficin RP Rol3Pl4y server.");
new Query[200], Ime[24], Finalime[24];
    GetPlayerName(playerid, Ime, 24);
    mysql_real_escape_string(Ime, Finalime);
    format(Query, sizeof(Query), "SELECT * FROM `playerinfo` WHERE `igrac` = '%s'", Finalime);
    mysql_query(Query);
    mysql_store_result();
    if(mysql_num_rows() != 0) //Ako je pronaÅ¡ao račun
    {

        // SetTimerEx("Intro", 5000,false,"i",playerid);
         SendClientMessage(playerid,0x80FF00FF,"[BCAC]:Ovaj račun je pronaÄ'en molimo da se logirate.");
new login[1024];
format(login,sizeof(login),"{33CCFF}__________________________________________________________________________\n\n{80FFFF}\t\t\t\tDobrodoÅ¡li: {80FF00}%s\t \n\t\t\t{80FFFF}vaÅ¡ račun je pronaÄ'en, molimo da se logirate.\n\n\n\n\t\t\t{FF8000}[C]Ficin RP Community www.nemaadrese.com\n{33CCFF}__________________________________________________________________________",Finalime);
         ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "{80FF00}Logiranje", login, "OK", "Cancel");
         TextDrawShowForPlayer(playerid,TDLOG0);
TextDrawShowForPlayer(playerid,TDLOG1);
TextDrawShowForPlayer(playerid,TDLOG2);
TextDrawShowForPlayer(playerid,TDLOG3);
TextDrawShowForPlayer(playerid,TDLOG4);

  }
    else
  {
      TextDrawShowForPlayer(playerid,TDREG0);
TextDrawShowForPlayer(playerid,TDREG1);
TextDrawShowForPlayer(playerid,TDREG2);
TextDrawShowForPlayer(playerid,TDREG3);
TextDrawShowForPlayer(playerid,TDREG4);
  SendClientMessage(playerid,0x80FF00FF,"[BCAC]:Ovaj račun nije pronaÄ'en molimo da se logirate.");
new regist[500];
format(regist,sizeof(regist),"{80FFFF}DobrodoÅ¡li: {80FF00}%s \n{80FFFF}vaÅ¡ račun nije pronaÄ'en, molimo da se registrirate.\n\n\n\n{FF8000}[C]Ficin RP Community www.nemaadrese.com",Finalime);
        ShowPlayerDialog(playerid, 555, DIALOG_STYLE_INPUT, "{80FF00}Registracija", regist, "OK", "Cancel");
        //ShowPlayerDialog(playerid, 555, DIALOG_STYLE_INPUT, "{80FF00}Registracija", "TEST TEsT TEST", "OK", "Cancel");

  }
return 1;
}/*


if(dialogid == 555) // Register dialog
{
   
    if(response)
    {
       
        new Query[1024], Ime[24], Finalime[24];
        GetPlayerName(playerid, Ime, 24);
        mysql_real_escape_string(Ime, Finalime);
        if(!strlen(inputtext))
            {
                new regist[50];
                format(regist,sizeof(regist),"{80FFFF}DobrodoÅ¡li: {80FF00}%s \n{80FFFF}vaÅ¡ račun nije pronaÄ'en, molimo da se registrirate.\n{FF8000}[C]Ficin RP Community www.nemaadrese.com");
                ShowPlayerDialog(playerid, 555, DIALOG_STYLE_INPUT, "{80FF00}Logiranje", regist, "OK", "Cancel");
                SendClientMessage(playerid, 0xFF3338C8, "[BCAC]:Molimo upiÅ¡ite lozinku!");
                return 1;
            }
            if(strlen(inputtext) <= 4 || strlen(inputtext) >= 20)
            {
                new regist[50];
                format(regist,sizeof(regist),"{80FFFF}DobrodoÅ¡li: {80FF00}%s \n{80FFFF}vaÅ¡ račun nije pronaÄ'en, molimo da se registrirate.\n{FF8000}[C]Ficin RP Community www.nemaadrese.com");
                ShowPlayerDialog(playerid, 555, DIALOG_STYLE_INPUT, "{80FF00}Logiranje", regist, "OK", "Cancel");
                SendClientMessage(playerid, 0xFF3338C8, "[BCAC]:Lozinka mora sadržavat minimum 4 znaka, a maximum 20!");
                return 1;
            }
            TextDrawHideForPlayer(playerid,TDREG0);
TextDrawHideForPlayer(playerid,TDREG1);
TextDrawHideForPlayer(playerid,TDREG2);
TextDrawHideForPlayer(playerid,TDREG3);
TextDrawHideForPlayer(playerid,TDREG4);
            PInfo[playerid][pLogged] = 1;
            new plrIP[16];
    GetPlayerIp(playerid, plrIP, sizeof(plrIP));
format(Query,sizeof(Query),"INSERT INTO `playerinfo` (`Igrac`,`Lozinka`,`Lider`,`Member`,`Admin`,`Gamemaster`,`TutorialS`) VALUES ('%s',MD5('%s'),'0','0','0','0','0')",Finalime,inputtext,plrIP);
mysql_query(Query);
PInfo[playerid][pLevel] = 1;
SetPlayerScore(playerid,1);
BCAC_DajNovac(playerid,5000);
PInfo[playerid][pNovac] = 5000;
OnPlayerSpawn(playerid);
SendClientMessage(playerid, 0x80FF00FF, "[BCAC]:Uspješno ste se registrirali i logirali!");


}


}