Analyzing a system mysql. amazed
#1

When I enter the server, even with registered account sometimes the dialog asks me to register, and sometimes to login. and even I registering / logging appears again even after logged in or registered, the dialog again. But if I have registered at the end will only login normally. And if I'm not registered, will register normally.

Only the fact is kinda messy time you see a, time appears another and appear two times. This started after I tried to do the mysql.


OnPlayerConnect
pawn Код:
new Str[74], Nome[21], ip[16];
    GetPlayerIp(playerid, ip, sizeof ip);
    GetPlayerName(playerid, Nome, 21);
    format(Str, 74, "SELECT `Nome` FROM `contas` WHERE `Nome`='%s' LIMIT 0,1", Nome);
    mysql_function_query(Connect, Str, true, "OnPlayerRequestClass", "i", playerid); // I think the mistake here can
OnPlayerRequestClass
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    if(IsPlayerNPC(playerid))
    {
        SpawnPlayer(playerid);
        return 1;
    }
    new ip[16];
    GetPlayerIp(playerid, ip, sizeof ip);
    new Row, Field;
    cache_get_data(Row, Field, Connect);
    if (RegistrationStep[playerid] == 0 && gPlayerLogged[playerid] != 1)
    {
        PlayerPlaySound(playerid, 1183, 0.0, 0.0, 0.0);
        ClearChatbox(playerid, 10);
        GameTextForPlayer(playerid," ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~g~Brasil ~y~Vision ~b~Street ~n~~r~RPG ~w~v.1.0",10000,6);
        //SetPlayerInterior(playerid,14);
        SetPlayerFacingAngle(playerid, 270.0);
        SetPlayerCameraPos(playerid,1417.5546,-1581.0309,95.5510);
        SetPlayerCameraLookAt(playerid,1512.7004,-1711.9816,17.7686);
        //SetPlayerInterior(playerid,1);
        SetPlayerInterior(playerid,0);
        if(Row)
        {
            new loginstring[256];
            new loginname[64];
            GetPlayerName(playerid,loginname,sizeof(loginname));
            SendClientMessage(playerid, COLOR_AZULBB, "");
            SendClientMessage(playerid, COLOR_AZULBB, "");
            SendClientMessage(playerid, COLOR_AZULBB, "");
            SendClientMessage(playerid, COLOR_AZULBB, "");
            SendClientMessage(playerid, COLOR_AZULBB, "");
            SendClientMessage(playerid, COLOR_AZULBB, "");
            SendClientMessage(playerid, COLOR_AZULBB, "");
            SendClientMessage(playerid, COLOR_AZULBB, "");
            SendClientMessage(playerid, COLOR_AZULBB, "");
            SendClientMessage(playerid, COLOR_AZULBB, "");
            SendClientMessage(playerid, COLOR_AZULBB, "");
            SendClientMessage(playerid, COLOR_AZULBB, "");
            SendClientMessage(playerid, COLOR_AZULBB, "");
            SendClientMessage(playerid, COLOR_AZULBB, "");
            SendClientMessage(playerid, COLOR_AZULBB, "");
            SendClientMessage(playerid, COLOR_AZULBB, ".•.•.•.•.•.•Seu nick estб registrado, faзa login abaixo.•.•.•.•.•.•");
            SendClientMessage(playerid, COLOR_AZULBB, ".•.•.•.•.•.•Caso erre a senha 5 vezes, terб o ip banido.•.•.•.•.•.•");
            format(loginstring,sizeof(loginstring),"{33CCFF}******************************************\n\n{f2fafa}Bem vindo(a), {12e03b}%s\n\n{f2fafa}Digite sua senha para entrar no servidor!!!\n\n{33CCFF}******************************************",loginname);
            ShowPlayerDialog(playerid, 1, DIALOG_STYLE_PASSWORD,"{00FF00}Brasil {f3f300}Vision {898989}Street {2641FE}[RPG v1.0]",loginstring,"Logar","Sair");

        }
        else
        {
            new loginstring[256];
            new loginname[64];
            GetPlayerName(playerid,loginname,sizeof(loginname));
            format(loginstring,sizeof(loginstring),"{33CCFF}******************************************\n\n{f2fafa}Bem vindo(a), {12e03b}%s\n\n{f2fafa}Digite sua senha para se registrar!!!\n\n{33CCFF}******************************************",loginname);
            ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT,"{00FF00}Brasil {f3f300}Vision {898989}Street {2641FE}[RPG v1.0]",loginstring,"Registrar","Sair");
            SendClientMessage(playerid, COLOR_AZULBB, "Vocк nгo estб registrado! Se Registre Para Jogar");
            SendClientMessage(playerid, COLOR_AZULBB, "Para ter acesso ao servidor vocк precisa se registrar.");
        }
        PlayerInfo[playerid][pSkin] = Peds[classid][0];
        SetPlayerTeamFromClass(playerid,classid);
    }
    else { SpawnPlayer(playerid); }
    return false;
}
DialogReponse LOGIN
pawn Код:
if(dialogid == 1)
    {
        if(response == 0)
        {
            SendClientMessage(playerid, TEAM_VAGOS_COLOR, "Ok, Caso queira fazer login posteriormente use /logar [senha]!");
            return 1;
        }
        if(response >= 1)
        {
            if(strlen(inputtext) == 0)
            {
                new loginstring[256];
                new loginname[64];
                GetPlayerName(playerid,loginname,sizeof(loginname));
                SendClientMessage(playerid, COLOR_AZULBB, "");
                SendClientMessage(playerid, COLOR_AZULBB, ".•.•.•.•.•.•Caso erre a senha 5 vezes, terб o ip banido.•.•.•.•.•.•");
                format(loginstring,sizeof(loginstring),"{33CCFF}******************************************\n\n{f2fafa}Bem vindo(a), {12e03b}%s\n\n{f2fafa}Digite sua senha para entrar no servidor!!!\n\n{33CCFF}******************************************",loginname);
                ShowPlayerDialog(playerid, 1, DIALOG_STYLE_PASSWORD,"{00FF00}Brasil {f3f300}Vision {898989}Street {2641FE}[RPG v1.0]",loginstring,"Logar","Sair");
                PlayerPlaySound(playerid, 1098, 0.0, 0.0, 0.0);
                return 1;
            }
            format(gstring,sizeof(gstring),"/logar %s",inputtext);
            OnPlayerCommandText(playerid,gstring);
            return 1;
        }
        return 1;
    }
DialogResponse Register
pawn Код:
if(dialogid == 2)
    {
        if(response == 0)
        {
            SendClientMessage(playerid, TEAM_VAGOS_COLOR, "Ok, Caso queira se registrar posteriormente use /registrar [senha]!");
            return 1;
        }
        if(response >= 1)
        {
            if(strlen(inputtext) == 0)
            {
                SetPlayerInterior(playerid,0);
                SetPlayerCameraPos(playerid,1417.5546,-1581.0309,95.5510);
                SetPlayerCameraLookAt(playerid,1512.7004,-1711.9816,17.7686);
                ShowPlayerDialog(playerid, 2, DIALOG_STYLE_PASSWORD, "Brasil Vision Street", "Bem Vindo ao Brasil Vision Street\nDigite sua senha para se registrar!", "Registrar", "Esperar");
                return 1;
            }
            format(gstring,sizeof(gstring),"/registrar %s",inputtext);
            OnPlayerCommandText(playerid,gstring);
            return 1;
        }
        return 1;
    }
Command Login
pawn Код:
if (strcmp(cmd, "/logar", true) ==0 )
    {
        if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))
        {
            new tmppass[64];
            if(gPlayerLogged[playerid] == 1)
            {
                SendClientMessage(playerid, COLOR_GREY, " Vocк jб estб logado.");
                return 1;
            }
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD1, "USE: /logar [Senha]");
                    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_PASSWORD, "{00FF00}Brasil {f3f300}Vision {898989}Street {2641FE}[RPG v1.0]", "Bem Vindo ao Brasil Vision Street\nDigite sua senha para entrar no servidor!!!", "Logar", "Esperar");
                return 1;
            }
            strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
            //OnPlayerLogin(playerid,tmppass);
            new Str[109], Nome[21];
            GetPlayerName(playerid, Nome, 21);
            format(Str, 109, "SELECT `Nome`, `Key` FROM `contas` WHERE `Nome`='%s' AND `Key`='%s'", Nome, tmppass);
            mysql_function_query(Connect, Str, true, "OnPlayerLogin", "ii", playerid);
        }
        return 1;
    }
Command Register
pawn Код:
if (strcmp(cmd, "/registrar", true) ==0 )
    {
        if(IsPlayerConnected(playerid))
        {
            if(gPlayerLogged[playerid] == 1)
            {
                SendClientMessage(playerid, COLOR_GREY, " Vocк jб estб logado.");
                return 1;
            }
            GetPlayerName(playerid, sendername, sizeof(sendername));
            format(string, 64, "Players/%s.ini", sendername);
            /*if (hFile)
            {
                SendClientMessage(playerid, COLOR_YELLOW, "{FF0000}{FFFFFF}[{00FF00}B{f3f300}V{909090}S{FFFFFF}]{CCCCFF} : Este Nick jб existe, use outro por favor.");
                fclose(hFile);
                ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Brasil Vision Street - Registro", "Bem Vindo ao Brasil Vision Street\nDigite sua senha para se registrar!!!", "Registrar", "Cancelar");
                return 1;
            }*/

            new tmppass[64];
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD1, "USE: /registrar [Senha]");
                SendClientMessage(playerid, COLOR_YELLOW, "-==> Use Nome_Sobrenome ( Ex: Kleversson_Ribeiro ) <==-");
                ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Brasil Vision Street - Registro", "Bem Vindo ao Brasil Vision Street\nDigite sua senha para se registrar!!!", "Registrar", "Cancelar");
                return 1;
            }
            strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
            new Str[65], Nome[21];
            GetPlayerName(playerid, Nome, 21);
            format(Str, 65, "SELECT `Nome` FROM `contas` WHERE `Nome`='%s'", Nome);
            mysql_function_query(Connect, Str, true, "OnPlayerRegister", "is", playerid,tmppass);
            //OnPlayerRegister(playerid,tmppass);
        }
        return 1;
    }
OnPlayerLogin
pawn Код:
new Row, Field;
    cache_get_data(Row, Field, Connect);
    if(Row)
    {
        new Str[1123], Nome[21];
        GetPlayerName(playerid, Nome, 21);
        format(Str, 98, "SELECT `Level`, `AdminLevel`, `Helper`, `DonateRank`, `PontosVIP`, `Voto`, `Familia`, `LFamilia`, ");
        format(Str, 233, "%s `Caixinha`, `UpgradePoints`, `ConnectedTime`, `Registered`, `Sex`, `Respect`, `Dinamit`, `Money`, `Bank`, `Barras`, `Crimes`, `Kills`,", Str);
        format(Str, 350, "%s `Deaths`, `Phonebook`, `LottoNr`, `Fishes`, `BiggestFish`, `Emprego`, `Paycheck`, `HeadValue`, `Jailed`, `JailTime`,", Str);
        format(Str, 469, "%s `Materiais`, `Maconha`, `Cocaina`, `Crack`, `Lider`, `Member`, `Rank`, `Char`, `ContractTime`, `DetSkill`, `SexSkill`,", Str);
        format(Str, 591, "%s `BoxSkill`, `LawSkill`, `MechSkill`, `NewsSkill`, `DrogasSkill`, `CookSkill`, `FishSkill`, `pSHealth`, `Team`, `PhoneNr`,", Str);
        format(Str, 707, "%s `House`, `Bizz`, `Spawn`, `SafeMaconha`, `SafeCocaina`, `SafeCrack`, `NivelProcurado`, `Galao`, `Madeira`, `Pizza`,", Str);
        format(Str, 825, "%s `SafeMateriais`, `Pos_x`, `Pos_y`, `Pos_z`, `CarLic`, `FlyLic`, `BoatLic`, `FishLic`, `GunLic`, `PayDay`, `CDPlayer`,", Str);
        format(Str, 941, "%s `Wins`, `Loses`, `AlcoholPerk`, `DrugPerk`, `MiserPerk`, `PainPerk`, `TraderPerk`, `Tutorial`, `Avisos`, `Married`,", Str);
        format(Str, 1019, "%s `MarriedTo`, `Luta`, `Dorgado`, `Dorgado2`, `Doenca`, `Creditos`, `LU`, `IP`,", Str);
        format(Str, 1123, "%s `Kicks`, `Bans`, `CadeiasAdm`, `Veiculo`, `CarKey` FROM `contas` WHERE `Nome` = '%s'", Str, Nome);
        //print(Str);
        mysql_function_query(Connect, Str, true, "OnPlayerLooad", "i", playerid);
    }
    else
    {
        SendClientMessage(playerid, COLOR_YELLOW, "Senha errada! - Se errar a senha 5 vezes terб o IP Banido!");
        new loginstring[256];
        new loginname[64];
        GetPlayerName(playerid,loginname,sizeof(loginname));
        format(loginstring,sizeof(loginstring),"{33CCFF}******************************************\n\n{f2fafa}Bem vindo(a), {12e03b}%s\n\n{f2fafa}Digite sua senha para entrar no servidor!!!\n\n{33CCFF}******************************************",loginname);
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_PASSWORD,"Brasil Vision Street  v1.3B",loginstring,"Logar","Sair");
        gPlayerLogTries[playerid] += 1;
        if(gPlayerLogTries[playerid] == 5)
        {
            new stri[64], tmp[20], tmp3[20], ip[16];
            GetPlayerIp(playerid, ip, sizeof ip);
            format(stri, sizeof(stri), "IPsBanidos/%s.ini",ip);
            getdate(Ano, Mes, Dia);
            format(tmp, 20, "%d/%d/%d", Dia, Mes, Ano);
            gettime(Hora, Minuto, Segundo);
            format(tmp3, 20, "%d:%d:%d", Hora, Minuto, Segundo);
            new Str[297];
            format(Str, 133, "INSERT INTO `banlist`(`IP`, `Nome`, `Nick`, `Admin`, `Motivo`, `TempoBan`, `DataBan`, `HoraBan`, `Pic1`, `Pic2`, `Pic3`, `Detalhes`)");
            format(Str, 297, "%s VALUES ('%s','naonaonao','%s','Automatico','Errou a senha 5 vezes','9999','%s','%s','---','---','---','In-Game')", Str, ip, PlayerName(playerid), tmp, tmp3);
            mysql_function_query(Connect, Str, false, "", "");
            //print(Str);
            SetTimer("kickarr", 500, 0);
            /*format(stri, sizeof(stri), "IPsBanidos/%s.ini",ip);
            dini_Create(stri);
            dini_Set(stri,"Motivo","Errou a senha 5 vezes");
            dini_Set(stri,"Admin","Automбtico");
            dini_Set(stri,"Data",tmp);
            dini_Set(stri,"Hora",tmp3);
            dini_Set(stri,"Nick",PlayerName(playerid));*/

            PlayerInfo[playerid][pKicks] += 1;
            Kick(playerid);
        }
        return 0;
    }
OnPlayerRegister
pawn Код:
new Rows, Fields;
            cache_get_data(Rows, Fields, Connect);
            strmid(PlayerInfo[playerid][pKey], password, 0, strlen(password), 255);
            if(!Rows)
            {
            new Str[2145], Nome[21], IP[16], ano, mes, dia, Strw[10];
            GetPlayerName(playerid,Nome,21);
            GetPlayerIp(playerid,IP,16);
            getdate(ano,mes,dia);
            format(Strw, 10, "%02d/%02d/%d",dia,mes,ano);
            format(Str, 414, "INSERT INTO `contas`(`Nome`, `Key`, `Level`, `AdminLevel`, `Helper`, `DonateRank`, `PontosVIP`, `Voto`, `Familia`, `LFamilia`, `Caixinha`, `UpgradePoints`, `ConnectedTime`, `Registered`, `Sex`, `Respect`, `Dinamit`, `Money`, `Bank`, `Barras`, `Crimes`, `Kills`, `Deaths`, `Phonebook`, `LottoNr`, `Fishes`, `BiggestFish`, `Emprego`, `Paycheck`, `HeadValue`, `Jailed`, `JailTime`, `Materiais`, `Maconha`, `Cocaina`,");
            format(Str, 812, " %s `Crack`, `Lider`, `Member`, `Rank`, `Char`, `ContractTime`, `DetSkill`, `SexSkill`, `BoxSkill`, `LawSkill`, `MechSkill`, `NewsSkill`, `DrogasSkill`, `CookSkill`, `FishSkill`, `pSHealth`, `Team`, `PhoneNr`, `House`, `Bizz`, `Spawn`, `SafeMaconha`, `SafeCocaina`, `SafeCrack`, `NivelProcurado`, `Galao`, `Madeira`, `Pizza`, `SafeMateriais`, `Pos_x`, `Pos_y`, `Pos_z`, `CarLic`, `FlyLic`, `BoatLic`,", Str);
            format(Str, 1254, " %s `FishLic`, `GunLic`, `PayDay`, `CDPlayer`, `Wins`, `Loses`, `AlcoholPerk`, `DrugPerk`, `MiserPerk`, `PainPerk`, `TraderPerk`, `Tutorial`, `Avisos`, `Married`, `MarriedTo`, `Luta`, `Dorgado`, `Dorgado2`, `Doenca`, `Creditos`, `LU`, `Gun1`, `Gun2`, `Gun3`, `Gun4`, `Gun5`, `Gun6`, `Gun7`, `Gun8`, `Gun9`, `Gun10`, `Gun11`, `Gun12`, `Ammo1`, `Ammo2`, `Ammo3`, `Ammo4`, `Ammo5`, `Ammo6`, `Ammo7`, `Ammo8`, `Ammo9`, `Ammo10`, `Ammo11`, `Ammo12`,", Str);
            format(Str, 1389, " %s `IP`, `DataReg`, `Descricao1`, `Descricao2`, `Descricao3`, `Descricao4`, `Email`, `Kicks`, `Bans`, `CadeiasAdm`, `Veiculo`, `CarKey`)", Str);
            format(Str, 1780, " %s VALUES ('%s','%s','2','0','0','0','0','0','0','0','0','0','0','%i','%i','0','0','10000', '15000','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','%f','0','%i','255','255','0','0','0','0','0','0','0','0','0','1684.9','-2244.5',", Str, Nome, password, PlayerInfo[playerid][pReg], PlayerInfo[playerid][pSex], PlayerInfo[playerid][pSHealth], PlayerInfo[playerid][pPnumber]);
            format(Str, 2145, " %s '13.5','0','0','0','0','0','0','0','0','0','0','0','0','0','0','%i','0','0','%s','0','0','0','0','0','%s','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','%s','%s','Descricao1','Descricao2','Descricao3','Descricao4','Email','0','0','0','255','255')", Str, PlayerInfo[playerid][pTut], PlayerInfo[playerid][pMarriedTo],PlayerInfo[playerid][pLastLogin],IP,Strw);
            //print(Str);
            mysql_function_query(Connect, Str, false, "", "");
            }
            else
            {
            new loginstring[256];
            new loginname[64];
            GetPlayerName(playerid,loginname,sizeof(loginname));
            SendClientMessage(playerid, COLOR_AZULBB, "");
            SendClientMessage(playerid, COLOR_AZULBB, "");
            SendClientMessage(playerid, COLOR_AZULBB, "");
            SendClientMessage(playerid, COLOR_AZULBB, "");
            SendClientMessage(playerid, COLOR_AZULBB, "");
            SendClientMessage(playerid, COLOR_AZULBB, "");
            SendClientMessage(playerid, COLOR_AZULBB, "");
            SendClientMessage(playerid, COLOR_AZULBB, "");
            SendClientMessage(playerid, COLOR_AZULBB, "");
            SendClientMessage(playerid, COLOR_AZULBB, "");
            SendClientMessage(playerid, COLOR_AZULBB, "");
            SendClientMessage(playerid, COLOR_AZULBB, "");
            SendClientMessage(playerid, COLOR_AZULBB, "");
            SendClientMessage(playerid, COLOR_AZULBB, "");
            SendClientMessage(playerid, COLOR_AZULBB, "");
            SendClientMessage(playerid, COLOR_AZULBB, ".•.•.•.•.•.•Seu nick estб registrado, fala login abaixo.•.•.•.•.•.•");
            SendClientMessage(playerid, COLOR_AZULBB, ".•.•.•.•.•.•Caso erre a senha 5 vezes, terб o ip banido.•.•.•.•.•.•");
            format(loginstring,sizeof(loginstring),"{33CCFF}******************************************\n\n{f2fafa}Bem vindo(a), {12e03b}%s\n\n{f2fafa}Digite sua senha para entrar no servidor!!!\n\n{33CCFF}******************************************",loginname);
            ShowPlayerDialog(playerid, 1, DIALOG_STYLE_PASSWORD,"{00FF00}Brasil {f3f300}Vision {898989}Street {2641FE}[RPG v1.0]",loginstring,"Logar","Sair");
            PlayerPlaySound(playerid, 1098, 0.0, 0.0, 0.0);
            }
It is only a matter of correction, and learning organization.

I know that was a bit long, plus the portion MySQL to analyze is small. wanted to put everything no questions or missing something.

I appreciate the patience of those who can help me.
Thank you.!
Reply
#2

someone with a lot of patience? = /
Reply
#3

Enable debug, and tell us, what it says. I have a feeling, that your GM is not connected with MySQL database.
Reply
#4

How do I enable debug mode? And yes, it is connected .. functions insert, delete, update. all work perfectly.

pawn Код:
Connect = mysql_connect("localhost", "root", "contas", "");
    if(mysql_ping(Connect) == -1) print("Erro ao carregar o banco de dados."), SendRconCommand("exit");
Reply
#5

Add:

PHP код:
mysql_debug(1); 
Under OnGameModeIntit

//Edit:

But try:

PHP код:
new RowField;
    
cache_get_data(RowFieldConnect);
    if(!
Row)
    {
        
SendClientMessage(playeridCOLOR_YELLOW"Senha errada! - Se errar a senha 5 vezes terб o IP Banido!");
        new 
loginstring[256];
        new 
loginname[64];
        
GetPlayerName(playerid,loginname,sizeof(loginname));
        
format(loginstring,sizeof(loginstring),"{33CCFF}******************************************\n\n{f2fafa}Bem vindo(a), {12e03b}%s\n\n{f2fafa}Digite sua senha para entrar no servidor!!!\n\n{33CCFF}******************************************",loginname);
        
ShowPlayerDialog(playerid1DIALOG_STYLE_PASSWORD,"Brasil Vision Street  v1.3B",loginstring,"Logar","Sair");
        
gPlayerLogTries[playerid] += 1;
        if(
gPlayerLogTries[playerid] == 5)
        {
            new 
stri[64], tmp[20], tmp3[20], ip[16];
            
GetPlayerIp(playeridipsizeof ip);
            
format(strisizeof(stri), "IPsBanidos/%s.ini",ip);
            
getdate(AnoMesDia);
            
format(tmp20"%d/%d/%d"DiaMesAno);
            
gettime(HoraMinutoSegundo);
            
format(tmp320"%d:%d:%d"HoraMinutoSegundo);
            new 
Str[297];
            
format(Str133"INSERT INTO `banlist`(`IP`, `Nome`, `Nick`, `Admin`, `Motivo`, `TempoBan`, `DataBan`, `HoraBan`, `Pic1`, `Pic2`, `Pic3`, `Detalhes`)");
            
format(Str297"%s VALUES ('%s','naonaonao','%s','Automatico','Errou a senha 5 vezes','9999','%s','%s','---','---','---','In-Game')"StripPlayerName(playerid), tmptmp3);
            
mysql_function_query(ConnectStrfalse"""");
            
//print(Str);
            
SetTimer("kickarr"5000);
            
/*format(stri, sizeof(stri), "IPsBanidos/%s.ini",ip);
            dini_Create(stri);
            dini_Set(stri,"Motivo","Errou a senha 5 vezes");
            dini_Set(stri,"Admin","Automбtico");
            dini_Set(stri,"Data",tmp);
            dini_Set(stri,"Hora",tmp3);
            dini_Set(stri,"Nick",PlayerName(playerid));*/
            
PlayerInfo[playerid][pKicks] += 1;
            
Kick(playerid);
        }
    }
    else
    {
        new 
Str[1123], Nome[21];
        
GetPlayerName(playeridNome21);
        
format(Str98"SELECT `Level`, `AdminLevel`, `Helper`, `DonateRank`, `PontosVIP`, `Voto`, `Familia`, `LFamilia`, ");
        
format(Str233"%s `Caixinha`, `UpgradePoints`, `ConnectedTime`, `Registered`, `Sex`, `Respect`, `Dinamit`, `Money`, `Bank`, `Barras`, `Crimes`, `Kills`,"Str);
        
format(Str350"%s `Deaths`, `Phonebook`, `LottoNr`, `Fishes`, `BiggestFish`, `Emprego`, `Paycheck`, `HeadValue`, `Jailed`, `JailTime`,"Str);
        
format(Str469"%s `Materiais`, `Maconha`, `Cocaina`, `Crack`, `Lider`, `Member`, `Rank`, `Char`, `ContractTime`, `DetSkill`, `SexSkill`,"Str);
        
format(Str591"%s `BoxSkill`, `LawSkill`, `MechSkill`, `NewsSkill`, `DrogasSkill`, `CookSkill`, `FishSkill`, `pSHealth`, `Team`, `PhoneNr`,"Str);
        
format(Str707"%s `House`, `Bizz`, `Spawn`, `SafeMaconha`, `SafeCocaina`, `SafeCrack`, `NivelProcurado`, `Galao`, `Madeira`, `Pizza`,"Str);
        
format(Str825"%s `SafeMateriais`, `Pos_x`, `Pos_y`, `Pos_z`, `CarLic`, `FlyLic`, `BoatLic`, `FishLic`, `GunLic`, `PayDay`, `CDPlayer`,"Str);
        
format(Str941"%s `Wins`, `Loses`, `AlcoholPerk`, `DrugPerk`, `MiserPerk`, `PainPerk`, `TraderPerk`, `Tutorial`, `Avisos`, `Married`,"Str);
        
format(Str1019"%s `MarriedTo`, `Luta`, `Dorgado`, `Dorgado2`, `Doenca`, `Creditos`, `LU`, `IP`,"Str);
        
format(Str1123"%s `Kicks`, `Bans`, `CadeiasAdm`, `Veiculo`, `CarKey` FROM `contas` WHERE `Nome` = '%s'"StrNome);
        
//print(Str);
        
mysql_function_query(ConnectStrtrue"OnPlayerLooad""i"playerid);
        return 
0;
    } 
Reply
#6

Delete....
Reply
#7

Hard, I went with a registered account. he asked to login. Login then appeared the dialog to register. more like I was already logged in, the message appeared that I could not register because he was already logged.

MySQL Log:
PHP код:
[20:28:52]  
[
20:28:52]  ** MySQL Debugging enabled (11/09/13)
[
20:28:52]  
[
20:28:52] >> mysql_connect(localhostrootcontas, ******) on port 3306
[20:28:52CMySQLHandler::CMySQLHandler() - constructor called.
[
20:28:52CMySQLHandler::CMySQLHandler() - Connecting to "localhost" DB"contas" Username"root"
[20:28:52CMySQLHandler::Connect() - Connection was successful.
[
20:28:52CMySQLHandler::Connect() - Auto-Reconnect has been enabled.
[
20:28:52] >> mysql_pingConnection handle)
[
20:28:52CMySQLHandler::Ping() - Connection is still alive.
[
20:29:13] >> mysql_query_callbackConnection handle)
[
20:29:13] >> mysql_query_callbackConnection handle)
[
20:29:13] >> mysql_query_callbackConnection handle)
[
20:29:13Passing query SELECT `NomeFROM `contasWHERE `Nome`='ViNi_ReBOrN' LIMIT 0,i
[20:29:13ProcessQueryThread(OnPlayerRequestClass) - Query was successful. (SELECT `NomeFROM `contasWHERE `Nome`='ViNi_ReBOrN' LIMIT 0,1)
[
20:29:13ProcessQueryThread(OnPlayerRequestClass) - Data caching enabled.
[
20:29:13CMySQLHandler::StoreResult() - Result was stored.
[
20:29:13CMySQLHandler::FreeResult() - Result was successfully free'd.
[20:29:13] CMySQLHandler::ProcessQueryThread() - Data is getting passed to ->ProcessTick()
[20:29:13] OnPlayerRequestClass(i) - Threaded function called.
[20:29:13] >> cache_get_data( Connection handle: 1 )
[20:29:13] ProcessTick() - The cache has been cleared.
[20:29:13] Passing query SELECT `Nome`, `TempoBan`, `TempoUnban` FROM `banlist` WHERE `Nome`='
ViNi_ReBOrN' | i
[20:29:13] ProcessQueryThread(CheckNomeBan) - Query was successful. (SELECT `Nome`, `TempoBan`, `TempoUnban` FROM `banlist` WHERE `Nome`='
ViNi_ReBOrN')
[20:29:13] ProcessQueryThread(CheckNomeBan) - Data caching enabled.
[20:29:13] CMySQLHandler::StoreResult() - Result was stored.
[20:29:13] CMySQLHandler::FreeResult() - Result was successfully free'
d.
[
20:29:13CMySQLHandler::ProcessQueryThread() - Data is getting passed to ->ProcessTick()
[
20:29:13CheckNomeBan(i) - Threaded function called.
[
20:29:13] >> cache_get_dataConnection handle)
[
20:29:13ProcessTick() - The cache has been cleared.
[
20:29:13Passing query SELECT `IPFROM `banlistWHERE `IP`='127.0.0.1' i
[20:29:13ProcessQueryThread(CheckIPBan) - Query was successful. (SELECT `IPFROM `banlistWHERE `IP`='127.0.0.1')
[
20:29:13ProcessQueryThread(CheckIPBan) - Data caching enabled.
[
20:29:13CMySQLHandler::StoreResult() - Result was stored.
[
20:29:13CMySQLHandler::FreeResult() - Result was successfully free'd.
[20:29:13] CMySQLHandler::ProcessQueryThread() - Data is getting passed to ->ProcessTick()
[20:29:13] CheckIPBan(i) - Threaded function called.
[20:29:13] >> cache_get_data( Connection handle: 1 )
[20:29:13] ProcessTick() - The cache has been cleared.
[20:29:22] >> mysql_query_callback( Connection handle: 1 )
[20:29:22] Passing query SELECT `Nome`, `Key` FROM `contas` WHERE `Nome`='
ViNi_ReBOrN' AND `Key`='aew' | ii
[20:29:22] >> cache_get_data( Connection handle: 1 )
[20:29:22] ProcessQueryThread(OnPlayerLogin) - Query was successful. (SELECT `Nome`, `Key` FROM `contas` WHERE `Nome`='
ViNi_ReBOrN' AND `Key`='aew')
[20:29:22] ProcessQueryThread(OnPlayerLogin) - Data caching enabled.
[20:29:22] CMySQLHandler::StoreResult() - Result was stored.
[20:29:22] CMySQLHandler::FreeResult() - Result was successfully free'
d.
[
20:29:22CMySQLHandler::ProcessQueryThread() - Data is getting passed to ->ProcessTick()
[
20:29:22OnPlayerLogin(ii) - Threaded function called.
[
20:29:22] >> cache_get_dataConnection handle)
[
20:29:22] >> mysql_query_callbackConnection handle)
[
20:29:22ProcessTick() - The cache has been cleared.
[
20:29:22Passing query SELECT `Level`, `AdminLevel`, `Helper`, `DonateRank`, `PontosVIP`, `Voto`, `Familia`, `LFamilia`, `Caixinha`, `UpgradePoints`, `ConnectedTime`, `Registered`, `Sex`, `Respect`, `Dinamit`, `Money`, `Bank`, `Barras`, `Crimes`, `Kills`, `Deaths`, `Phonebook`, `LottoNr`, `Fishes`, `BiggestFish`, `Emprego`, `Paycheck`, `HeadValue`, `Jailed`, `JailTime`, `Materiais`, `Maconha`, `Cocaina`, `Crack`, `Lider`, `Member`, `Rank`, `Char`, `ContractTime`, `DetSkill`, `SexSkill`, `BoxSkill`, `LawSkill`, `MechSkill`, `NewsSkill`, `DrogasSkill`, `CookSkill`, `FishSkill`, `pSHealth`, `Team`, `PhoneNr`, `House`, `Bizz`, `Spawn`, `SafeMaconha`, `SafeCocaina`, `SafeCrack`, `NivelProcurado`, `Galao`, `Madeira`, `Pizza`, `SafeMateriais`, `Pos_x`, `Pos_y`, `Pos_z`, `CarLic`, `FlyLic`, `BoatLic`, `FishLic`, `GunLic`, `PayDay`, `CDPlayer`, `Wins`, `Loses`, `AlcoholPerk`, `DrugPerk`, `MiserPerk`, `PainPerk`, `TraderPerk`, `Tutorial`, `Avisos`, `Married`, `MarriedTo`, `Luta`, `Dorgado`, `Dorgado2`, `Doenca`, `Creditos`, `LU`, `IP`, `Kicks`, `Bans`, `CadeiasAdm`, `Veiculo`, `CarKeyFROM `contasWHERE `Nome` = 'ViNi_ReBOrN' i
[20:29:22ProcessQueryThread(OnPlayerLooad) - Query was successful. (SELECT `Level`, `AdminLevel`, `Helper`, `DonateRank`, `PontosVIP`, `Voto`, `Familia`, `LFamilia`, `Caixinha`, `UpgradePoints`, `ConnectedTime`, `Registered`, `Sex`, `Respect`, `Dinamit`, `Money`, `Bank`, `Barras`, `Crimes`, `Kills`, `Deaths`, `Phonebook`, `LottoNr`, `Fishes`, `BiggestFish`, `Emprego`, `Paycheck`, `HeadValue`, `Jailed`, `JailTime`, `Materiais`, `Maconha`, `Cocaina`, `Crack`, `Lider`, `Member`, `Rank`, `Char`, `ContractTime`, `DetSkill`, `SexSkill`, `BoxSkill`, `LawSkill`, `MechSkill`, `NewsSkill`, `DrogasSkill`, `CookSkill`, `FishSkill`, `pSHealth`, `Team`, `PhoneNr`, `House`, `Bizz`, `Spawn`, `SafeMaconha`, `SafeCocaina`, `SafeCrack`, `NivelProcurado`, `Galao`, `Madeira`, `Pizza`, `SafeMateriais`, `Pos_x`, `Pos_y`, `Pos_z`, `CarLic`, `FlyLic`, `BoatLic`, `FishLic`, `GunLic`, `PayDay`, `CDPlayer`, `Wins`, `Loses`, `AlcoholPerk`, `DrugPerk`, `MiserPerk`, `PainPerk`, `TraderPerk`, `Tutorial`, `Avisos`, `Married`, `MarriedTo`, `Luta`, `Dorgado`, `Dorgado2`, `Doenca`, `Creditos`, `LU`, `IP`, `Kicks`, `Bans`, `CadeiasAdm`, `Veiculo`, `CarKeyFROM `contasWHERE `Nome` = 'ViNi_ReBOrN')
[
20:29:22ProcessQueryThread(OnPlayerLooad) - Data caching enabled.
[
20:29:22CMySQLHandler::StoreResult() - Result was stored.
[
20:29:22CMySQLHandler::FreeResult() - Result was successfully free'd.
[20:29:22] CMySQLHandler::ProcessQueryThread() - Data is getting passed to ->ProcessTick()
[20:29:22] OnPlayerLooad(i) - Threaded function called.
[20:29:22] >> cache_get_data( Connection handle: 1 )
[20:29:22] >> mysql_query_callback( Connection handle: 1 )
[20:29:22] ProcessTick() - The cache has been cleared.
[20:29:22] Passing query SELECT `Nome`, `Quantidade`, `TempExpire` FROM `viplist` WHERE `Nome`='
ViNi_ReBOrN' | i
[20:29:22] ProcessQueryThread(CheckVip) - Query was successful. (SELECT `Nome`, `Quantidade`, `TempExpire` FROM `viplist` WHERE `Nome`='
ViNi_ReBOrN')
[20:29:22] ProcessQueryThread(CheckVip) - Data caching enabled.
[20:29:22] CMySQLHandler::StoreResult() - Result was stored.
[20:29:22] CMySQLHandler::FreeResult() - Result was successfully free'
d.
[
20:29:22CMySQLHandler::ProcessQueryThread() - Data is getting passed to ->ProcessTick()
[
20:29:22CheckVip(i) - Threaded function called.
[
20:29:22] >> cache_get_dataConnection handle)
[
20:29:22ProcessTick() - The cache has been cleared
Reply
#8

Anyone?
Reply
#9

please.. =s
Reply
#10

heelp me
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)