20.07.2012, 12:38
I have 3 dialogs under OnPlayerConnect. 2 for Logging in/Registration and 1 for Choosing Team.
When i comment or delete the Team Selection Dialog, Login/Register dialogs shows up. But when i add the team selection dialog, like in above code, it simply skips the Login/Register Dialogs and shows Team Selection Dialog directly.
Код:
public OnPlayerConnect(playerid) { new query[200],pName[30]; GetPlayerName(playerid,pName,30); format(query,sizeof(query),"Select * from Users where Username='%s'",pName); mysql_query(query); mysql_store_result(); if(mysql_num_rows() == 1) { ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login","Enter your password to login","Login",""); } else { ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Register","Enter your password to Register","Register",""); } mysql_free_result(); ShowPlayerDialog(playerid,DIALOG_CHOOSETEAM,DIALOG_STYLE_LIST,"Team Selection","1. Groove Street Families \n2. Ballas \n3.Varios Los Aztecas","Select","Quit"); cycleSkin[playerid]=0; return 1; }