Kickmessage doesn't appear.
#1

pawn Код:
stock PlayerLogin(playerid, password[])
{
    new str[128];
    format(str, sizeof(str),"SELECT * FROM users WHERE username = '%s' AND password = md5('%s')",pName(playerid),password);
    mysql_ping();
    mysql_query(str);
    mysql_store_result();
    if(!mysql_num_rows())
    {
        SendInfoMessage(playerid,"Wrong {a9c4e4}password{ffffff}! Kicked due to security reasons!");
        PlayerInfo[playerid][pLogged] = 0;
        mysql_free_result();
        Kick(playerid);
        return 1;
    }
        return 1;
}
First of all, when this function gets called, the player always gets kicked. It never returns true even though the username and password is in the database.

Second of all, when the player gets kicked, the SendInfoMessage doesn't show up. It's just "Server closed the connection"

pawn Код:
stock SendInfoMessage(playerid,message[])
{
    new str[256];
    format(str, sizeof(str),"{a9c4e4}SERVER: {FFFFFF}%s",message);
    return SendClientMessage(playerid,COLOR_WHITE,str);
}
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=441968

use kickban.inc from emmet
Reply
#3

Thanks
Reply
#4

And the MySQL PRoblem, does anyone know?
Reply
#5

bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)