Loggin Issue -
MrCallum - 26.03.2016
When I try to join the server, it says 'Connected to server' and nothing pops up, yet on OnPlayerRequestClass, I have placed my own code so it either registers or you login.:
Код:
public OnPlayerRequestClass(playerid, classid)
{
SetSpawnInfo(playerid, 0, 0, 0.00, 0.00, 0.00, 0.00, 0, 0, 0, 0, 0, 0);
SetPlayerJoinCamera(playerid);
new file[64];
format(file, sizeof(file), "Players/%s.ini", RPNU(playerid));
// Player isn't banned
if(!fexist(UserPath(playerid)))
{
ShowDialog(playerid, 0);
return 1;
}
else
{
ShowDialog(playerid, 1);
}
return 1;
}
Код:
stock ShowDialog(playerid, dialogid)
{
new string[256];
new titlestring[64];
switch(dialogid)
{
case 0: // Register
{
new ip[32];
GetPlayerIp(playerid, ip, 32);
format(titlestring, sizeof(titlestring), "{A90202}Register - %s", RPN(playerid)); // LINE 309
format(string, sizeof(string), "{FFFFFF}Welcome to {A90202}BlueBerry Roleplay{FFFFFF}, %s.\n\nIP Address: %s\n\nYou may register an account by entering a desired password here:", RPN(playerid), ip);
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_PASSWORD,titlestring,string,"Register","Exit");
}
case 1: // Login
{
new ip[32];
GetPlayerIp(playerid, ip, 32);
format(titlestring, sizeof(titlestring), "{A90202}Login - %s", RPN(playerid)); // LINE 300
format(string, sizeof(string), "{FFFFFF}Welcome to {A90202}BlueBerry Roleplay{FFFFFF}, %s.\n\nIP Address: %s\n\nThe name that you are using is registered, please enter a password to login:", RPN(playerid), ip);
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,titlestring,string,"Login","Exit");
}
case 2: // Male/Female
{
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Choose your character's gender", "Male\nFemale", "Choose", "Cancel");
}
case 3: // Age
{
ShowPlayerDialog(playerid, 4, DIALOG_STYLE_INPUT, "Character's age","Choose your character's age (15-80)", "Choose", "Cancel");
format(string, sizeof(string), "Ok, so you are %d years old.",PlayerInfo[playerid][Age]);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
}
}
return 1;
}
Re: Loggin Issue -
Mencent - 26.03.2016
Hi!
What's printed when you take this code?:
PHP код:
stock ShowDialog(playerid, dialogid)
{
printf("ShowDialog (playerid: %d) is calling",playerid);
new string[256];
new titlestring[64];
switch(dialogid)
{
case 0: // Register
{
printf("playerid: %d - Register",playerid);
new ip[32];
GetPlayerIp(playerid, ip, 32);
format(titlestring, sizeof(titlestring), "{A90202}Register - %s", RPN(playerid)); // LINE 309
format(string, sizeof(string), "{FFFFFF}Welcome to {A90202}BlueBerry Roleplay{FFFFFF}, %s.\n\nIP Address: %s\n\nYou may register an account by entering a desired password here:", RPN(playerid), ip);
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_PASSWORD,titlestring,string,"Register","Exit");
}
case 1: // Login
{
printf("playerid: %d - Login",playerid);
new ip[32];
GetPlayerIp(playerid, ip, 32);
format(titlestring, sizeof(titlestring), "{A90202}Login - %s", RPN(playerid)); // LINE 300
format(string, sizeof(string), "{FFFFFF}Welcome to {A90202}BlueBerry Roleplay{FFFFFF}, %s.\n\nIP Address: %s\n\nThe name that you are using is registered, please enter a password to login:", RPN(playerid), ip);
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,titlestring,string,"Login","Exit");
}
case 2: // Male/Female
{
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Choose your character's gender", "Male\nFemale", "Choose", "Cancel");
}
case 3: // Age
{
ShowPlayerDialog(playerid, 4, DIALOG_STYLE_INPUT, "Character's age","Choose your character's age (15-80)", "Choose", "Cancel");
format(string, sizeof(string), "Ok, so you are %d years old.",PlayerInfo[playerid][Age]);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
}
}
return 1;
}