OnPlayerConnect get stuck :S - 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: OnPlayerConnect get stuck :S (
/showthread.php?tid=324804)
OnPlayerConnect get stuck :S -
System64 - 10.03.2012
Hi guys, I launched my stunt server today and I got stuck, I don't have row with my name in table and when I connect nothing happens, debug (print functions) show's in console but Kick and SendClientMessage don't -.-
pawn Код:
format(Query, sizeof(Query), "SELECT Korisnik FROM `racuni` WHERE `Korisnik` = '%s' LIMIT 1", mysql_get_name(playerid));
mysql_query(Query);
mysql_store_result();
if(mysql_num_rows() == 1)
{
format(title, sizeof(title), "{00CCFF} Dobrodoљao{FFFFFF} %s!", GetName(playerid));
format(text2, sizeof(text2), "{FFFFFF}______________________________\n\n{00CCFF}Ime{FFFFFF} %s{00CCFF} je registrirano!\nPrijavite se!", GetName(playerid));
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT , title, text2, "Ok", "Izlaz");
}
else
{
print("else called");
SendClientMessage(playerid, COLOR_YELLOW, "Registrirajte se na www. ..."); //this doesn't work
Kick(playerid); //this doesn't work
print("else called again");
}
mysql_free_result();
I use MySQL R6-2 plugin and SA:MP 0.3e RC-2
Re: OnPlayerConnect get stuck :S -
-Prodigy- - 10.03.2012
There's a bug in OnPlayerConnect if you use Kick. Set a 500 ms timer then call Kick() and the SendClientMessage()
Re: OnPlayerConnect get stuck :S -
System64 - 10.03.2012
oh thanks for response, is it bug since 0.3d or? Will try to make how you said
edit: thanks, now it works
Kalcor please fix this fasttttt!