16.07.2011, 10:34
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case 1: { if(!response)return Kick(playerid); // missed a bracket. should be Kick instead of kick
//if(!response) lol
//{ lol
if(strlen(inputtext))
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Register", "Please type in a password.", "Register","Exit");
}
if(INI_Open(getINI(playerid)))
{
INI_WriteString("password", inputtext);
INI_WriteInt("age", inputtext);
INI_WriteInt("cash", 200000);
INI_WriteInt("score",1);
INI_WriteInt("kills", 0);
INI_WriteInt("deaths", 0);
INI_WriteInt("timeplayed", 0);
INI_WriteInt("ipaddress", ipaddress);
INI_WriteInt("saveposition", saveposition);
INI_WriteInt("Admin", 0);
INI_WriteInt("faction", 0);
INI_WriteInt("faction", 0);
INI_WriteInt("bankdeposit", 0);
INI_WriteInt("ban", 0);
INI_WriteString("banreason", "");
INI_WriteInt("house", 0);
INI_WriteInt("biz", 0);
INI_WriteInt("fightstyle", 0);
INI_Save();
INI_Close();
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Login", "Please enter your password to login", "Login", "Exit");
}
}
case 2:
{
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Login", "Please enter your password to login", "Login", "Exit");
}
}
return 1;
}