26.03.2016, 12:50
Hi!
What's printed when you take this code?:
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;
}