OnPlayerConnect get stuck :S
#1

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
Reply
#2

There's a bug in OnPlayerConnect if you use Kick. Set a 500 ms timer then call Kick() and the SendClientMessage()
Reply
#3

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!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)