Problem with login
#1

So im re-desinging a ban system, and now i got a problem.
When I check on OnPlayerConnect if player is banned it should redirect me to Thread_BanInfo but it doesn't.

This the system for these two.

This is under OnPlayerConnect

Код:
	format(gQuery, sizeof(gQuery), "SELECT * FROM `Banovi` WHERE `Name` = '%s'", Name(playerid));
	mysql_tsquery(gQuery, THREAD_BANINFO, playerid, konekt);
this is the thread.

pawn Код:
case THREAD_BANINFO:
        {
            if(szRows > 0)
            {
                new query[512], szValue[65], hIme[MAX_PLAYER_NAME], hRazlog[65], istice, vrsta, str[650];
               
                cache_get_field_content(0, "Ime", hIme, konekt, MAX_PLAYER_NAME);
                cache_get_field_content(0, "Razlog", hRazlog, konekt, 64);
                cache_get_field_content(0, "Istice", szValue, konekt); istice = strval(szValue);
                cache_get_field_content(0, "Vrsta", szValue, konekt); vrsta = strval(szValue);
               
                if(gettime() - istice > 0 && vrsta == BAN_VREMENSKI)
                {
                    SCM(extraid, LIGHTBLUE, " (info) {FFFFFF}Vas ban je istekao, mozete nastaviti sa igrom na serveru !");
                   
                    format(query, sizeof(query), "DELETE * FROM `Banovi` WHERE `Name` = '%s'", Name(extraid));
                    mysql_tsquery(query, THREAD_OSTALO, extraid, konekt);
                   
                    format(query, sizeof(query), "UPDATE `Igraci` SET `Banovan` = '0' WHERE `Name` = '%s'", Name(extraid));
                    mysql_tsquery(query, THREAD_OSTALO, extraid, konekt);
                   
                    format(query, sizeof(query), "SELECT * FROM `Igraci` WHERE `Name` = '%s'", Name(extraid));
                    mysql_tsquery(query, THREAD_NALOGPROVERA, extraid, konekt);
                }
                else
                {
                    format(str, sizeof(str), "Vi ste banovani sa Roleplay Factory Servera !\n\nVase Ime: %s\nRazlog: %s.\nVrsta Bana: %s.\nIstice: %s.", ImeIgraca(extraid), hRazlog, GetBanType(vrsta), gettimestamp(istice, 3));
                    SPD(extraid, 0, DIALOG_STYLE_MSGBOX, "Ban Informacije", str, "Uredu", "");
                }
            }
            else
            {
                new squery[600];
                format(squery, sizeof(squery), "SELECT * FROM `Igraci` WHERE `Name` = '%s'", Name(extraid));
            mysql_tsquery(squery, THREAD_NALOGPROVERA, extraid, konekt);
            }
        }
Reply


Messages In This Thread
Problem with login - by ShoortyFl - 22.06.2014, 13:20
Re: Problem with login - by ShoortyFl - 22.06.2014, 14:48

Forum Jump:


Users browsing this thread: 1 Guest(s)