SA-MP Forums Archive
MySQl Register Problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MySQl Register Problem (/showthread.php?tid=333932)



MySQl Register Problem - ColdRain - 13.04.2012

i did this

pawn Код:
#define SQL_HOST "mysql15.000webhost.com"
#define SQL_USER "a7402147_urcnr"
#define SQL_PASS "****************"
#define SQL_DB "a7402147_urcnr"

i add at the top of script #define reg 15000
pawn Код:
if(dialogid == reg)
    {
        new Query[3000];
        if(!response){
        Quited[playerid] = 1;
        Kick(playerid);
        return 1;
        }

        if(strlen(inputtext) <= 5){
        ShowPlayerDialog(playerid,reg,DIALOG_STYLE_INPUT,"{FF0000}Registeration","{FFFFFF}Password Must Be Than More Than 5 Charcters","Register","Quit");
        return 1;
        }

        if(strlen(inputtext) == 0){
        ShowPlayerDialog(playerid,reg,DIALOG_STYLE_INPUT,"{FF0000}Registeration","{FFFFFF}You Did not enter password!\nPlease enter password below to register","Register","Quit");
        return 1;
        }
        new pip[30];
        new playerip = GetPlayerIp(playerid,pip,30);
        format(Query,sizeof(Query),"INSERT INTO playerdata (name,password,playerIP,score,money,warnings,nameban,jailed,jailtime,raperrank,arrestrank,dragpoints,pvtlaw,armyranks,tazeranks,hitmanrank,takeddownrank,weapsdealer,salesdealer,medicrank,mechanicrank,cashinsured,canusearmy,canuseswat,armycommander,swatcommander,adminlevel,RegAsAdmin,presdient,RegularPlayer) VALUES ('%s','%s','%d',0,2500,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)",PlayerName(playerid),inputtext,playerip);
        mysql_query(Query);
        SendClientMessage(playerid,COLOR_GREEN,"Congratulation! You have created own account have fun in our server!");
        PLAYERLIST_reg[playerid]=true;
        PLAYERLIST_authed[playerid] =false;
    }


When i go ingame its show me register dialog but when i register nothing happend in mysql database myname file doesn't go there ...


Re: MySQl Register Problem - [HiC]TheKiller - 13.04.2012

Put
pawn Код:
mysql_debug(1);
under OnGameModeInit then restart your script, go through the register dialog, and then post the contents of your mysql log file in your server directory.

EDITED: Wrong thing.


Re: MySQl Register Problem - ColdRain - 13.04.2012

Its give me error on the line of mysql_log(1); accept my email request so it will be easy on you to help me please!


Re: MySQl Register Problem - ColdRain - 13.04.2012

My Email is; weh0@live.com add me please


Re: MySQl Register Problem - ColdRain - 13.04.2012

its not also work on the localhost pleas help!