09.03.2012, 21:38
can any help me when i login he kick me
i hope any can help
pawn Код:
//---------------- Login/Register -------------------------------------
case (DIALOGID+40):
{
if(!response)
return Kick(playerid);
new pw[255];
format(PlayerFile, sizeof(PlayerFile), "/accounts/%s.sav", PlayerName[playerid]);
pw = dini_Get(PlayerFile , "password");
if(!isValidPW(playerid, inputtext, pw))
{
return ShowPlayerDialog(playerid, DIALOGID+40, DIALOG_STYLE_INPUT,"Welcome to Exchange-Life","You have entered a wrong password. Try again","Login","Quit");
}
OnPlayerLogin(playerid);
TextDrawHideForPlayer(playerid, welcometextdraw[1]);
TextDrawHideForPlayer(playerid, welcometextdraw[0]);
return 1;
}
case (DIALOGID+41)://Register
{
if(!response) return Kick(playerid);
new pw[255];
PlayerIsInInfoTutorial[playerid] = 0;
SpawnPlayer(playerid);
format(PlayerFile, sizeof(PlayerFile), "/accounts/%s.sav", PlayerName[playerid]);
SavePlayer(playerid);//creates a possible Accountfile
dini_Set(PlayerFile, "password", inputtext);//Sets the password
dini_IntSet(PlayerFile, "sAllowRandomMessage",1);
format(pw,sizeof(pw),"%s",inputtext); //Instantly gets the password from original string, no need to get it out of the account since it is always equal to inputtext
PlayerInfo[playerid][pPassword] = pw;
IsPlayerLoggedIn[playerid]=1;
TextDrawHideForPlayer(playerid, welcometextdraw[1]);
TextDrawHideForPlayer(playerid, welcometextdraw[0]);
SendClientMessage(playerid, COLOR_GREEN, "__________________________________________________");
SendClientMessage(playerid, COLOR_WHITE, "You have succesfully created an account.");
PlayerInfo[playerid][pDoneTutorial]=0;
InfoInIt(playerid, 0);
return 1;
}