Kickmessage doesn't appear. - 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: Kickmessage doesn't appear. (
/showthread.php?tid=446524)
Kickmessage doesn't appear. -
introzen - 26.06.2013
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);
}
Re: Kickmessage doesn't appear. -
Guest123 - 26.06.2013
https://sampforum.blast.hk/showthread.php?tid=441968
use kickban.inc from emmet
Re: Kickmessage doesn't appear. -
introzen - 26.06.2013
Thanks
Re: Kickmessage doesn't appear. -
introzen - 26.06.2013
And the MySQL PRoblem, does anyone know?
Re: Kickmessage doesn't appear. -
introzen - 26.06.2013
bump