public OnPlayerConnect(playerid)
{
if(fexist(UserSavePath(playerid)))
{
new string[128], string2[128];
format(string, sizeof(string), ""GM_NAME" Login: (%s)", GetPlayerNameEx(playerid));
format(string, sizeof(string), "%s, we have found your account registered in the database!\nPlease login to continue.", GetPlayerNameEx(playerid));
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, string, string2, "Login", "Close");
}
else
{
new string[128], string2[128];
format(string, sizeof(string), ""GM_NAME" Registration: (%s)", GetPlayerNameEx(playerid));
format(string, sizeof(string), "%s, we cannot find this name registered in the database!\nPlease enter a password to register.", GetPlayerNameEx(playerid));
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, string, string2, "Register", "Close");
}
gPlayerLogged[playerid] = 0;
return 1;
}
public OnPlayerConnect(playerid) { if(fexist(UserSavePath(playerid))) { new string[128], string2[128]; format(string, sizeof(string), ""GM_NAME" Login: (%s)", GetPlayerNameEx(playerid)); format(string2, sizeof(string2), "%s, we have found your account registered in the database!\nPlease login to continue.", GetPlayerNameEx(playerid)); ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, string, string2, "Login", "Close"); } else { new string[128], string2[128]; format(string, sizeof(string), ""GM_NAME" Registration: (%s)", GetPlayerNameEx(playerid)); format(string2, sizeof(string2), "%s, we cannot find this name registered in the database!\nPlease enter a password to register.", GetPlayerNameEx(playerid)); ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, string, string2, "Register", "Close"); } gPlayerLogged[playerid] = 0; return 1; }
public OnPlayerConnect(playerid) { if(fexist(UserSavePath(playerid))) { new string[128], string2[128]; format(string, sizeof(string), ""GM_NAME" Login: (%s)", GetPlayerNameEx(playerid)); format(string, sizeof(string), "%s, we have found your account registered in the database!\nPlease login to continue.", GetPlayerNameEx(playerid)); ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, string, string2, "Login", "Close"); } else { new string[128], string2[128]; format(string, sizeof(string), ""GM_NAME" Registration: (%s)", GetPlayerNameEx(playerid)); format(string, sizeof(string), "%s, we cannot find this name registered in the database!\nPlease enter a password to register.", GetPlayerNameEx(playerid)); ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, string, string2, "Register", "Close"); } gPlayerLogged[playerid] = 0; return 1; }
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, string, string2, "Register", "Close");
#define DIALOG_LOGIN 3
public OnPlayerConnect(playerid) { if(fexist(UserSavePath(playerid))) { new string[128], string2[128]; format(string, sizeof(string), ""GM_NAME" Login: (%s)", GetPlayerNameEx(playerid)); format(string, sizeof(string), "%s, we have found your account registered in the database!\nPlease login to continue.", GetPlayerNameEx(playerid)); ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, string, string2, "Login", "Close"); } else { new string[128], string2[128]; format(string, sizeof(string), ""GM_NAME" Registration: (%s)", GetPlayerNameEx(playerid)); format(string, sizeof(string), "%s, we cannot find this name registered in the database!\nPlease enter a password to register.", GetPlayerNameEx(playerid)); ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_INPUT, string, string2, "Register", "Close"); } gPlayerLogged[playerid] = 0; return 1; }
For you information, if there is no #define DIALOG_LOGIN 3 in his script he couldn't compile it and start server so DIALOG_LOGIN is defined.
|
........
In: Код:
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, string, string2, "Register", "Close"); Example: Код:
#define DIALOG_LOGIN 3 |