Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

AMX brack

$
0
0
PHP Code:

    switch(dialogid)
    {
        case 
dLOGIN//login dialog
        
{
            if(!
responseKick(playerid); //if they clicked Quit, we will kick them
            
new hpass[129]; //for password hashing
            
new query[100]; // for formatting our query.
            
WP_Hash(hpass129inputtext); //hashing inputtext
            
if(!strcmp(hpasspData[playerid][Password])) //remember we have loaded player's password into this variable, pData[playerid][Password] earlier. Now let's use it to compare the hashed password with password that we load
            
{
                
mysql_format(mysqlquerysizeof(query), "SELECT * FROM `players` WHERE `Username` = '%e' LIMIT 1"pName(playerid));
                
mysql_tquery(mysqlquery"OnAccountLoad""i"playerid);
            }
            else 
//if the hashed password didn't match with the loaded password(pData[playerid][Password])
            
{
                
ShowPlayerDialog(playeriddLOGINDIALOG_STYLE_INPUT"Login""In order to play, you need to login\nWrong password!""Login""Quit");
                new 
tmp[3000],str[3000];
                
pInfo[playerid][WrongPass]++;
                
format(tmpsizeof(tmp), "9,2%s (ID: %d) tried to login using a wrong password"playerid);
                
IRC_GroupSay(groupIDIRC_aCHANNELtmp);
                
IRC_GroupSay(groupIDIRC_CHANNELtmp);
                
format(strsizeof(str), "ZoneX: %s (ID: %d) tried to login using a wrong password"playerid);
                
SendClientMessage(playeridCOLOR_REDstr);
            }
            if(
pInfo[playerid][WrongPass] == 3)
            {
                new 
tmp[3000],str[3000];
                
pInfo[playerid][WrongPass] = 0;
                
format(tmpsizeof(tmp), "9,2%s (ID: %d) has been kicked due to using many wrong password."GetName(playerid), playerid);
                
IRC_GroupSay(groupIDIRC_aCHANNELtmp);
                
IRC_GroupSay(groupIDIRC_CHANNELtmp);
                
format(strsizeof(str), "ZoneX: %s (ID: %d) has been kicked due to using many wrong password."GetName(playerid), playerid);
                
SendClientMessageToAll(COLOR_REDstr);
                
Kick(playerid);
            }
        } 

Problem from the Wrong password login it doesn't work

Code:

[15:25:31] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[15:25:31] [debug]  Stack pointer (STK) is 0x50F29C, heap pointer (HEA) is 0x51142C
[15:25:31] [debug] AMX backtrace:
[15:25:31] [debug] #0 00000000 in public OnDialogResponse ()


Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>