23.09.2012, 11:32
Is this even under OnDialogResponse?
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if (dialogid == 100)
{
if(!response) return Kick(playerid);
new password[23];//Creating a variable to store the password
if(sscanf(inputtext,"s[23]",password)) return Kick(playerid);
new file[64],PlayerName[24];
GetPlayerName(playerid,PlayerName,sizeof PlayerName);
format(file,sizeof file,"Players/%s.ini",PlayerName);
if(fexist(file)) return SendClientMessage(playerid,-4,"This username is allready registerd, try another one!");
INI_Open(file);
INI_WriteString("Password",password);
INI_WriteInt("Level",PInfo[playerid][Level]);
INI_Save();
INI_Close();
SendClientMessage(playerid,-1,"You have successfully registered!");
PInfo[playerid][Logged] = 1;
return 1;
}
return 0;
}