26.06.2013, 11:39
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;
}
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);
}