24.06.2012, 13:11
try
pawn Код:
new String[150];
if(dialogid == DIALOG_LOGIN)
{
if(response)
{
new File:File = fopen(Player[playerid][PlayerFile],io_read);
fread(File,String);
sscanf(String,"'%s', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d'",Player[playerid][PlayerPassword],Player[playerid][PlayerDateOfRegister],Player[playerid][PlayerVisits],Player[playerid][PlayerMoney],Player[playerid][PlayerRespect],Player[playerid][PlayerLevel],Player[playerid][PlayerRespectToNextLevel],Player[playerid][PlayerSuicides],Player[playerid][PlayerDeaths],Player[playerid][PlayerKills],Player[playerid][PlayerSendMessages],Player[playerid][PlayerSendCommands],
Player[playerid][PlayerAdministratorLevel],Player[playerid][PlayerModerator],Player[playerid][PlayerVip]);
fclose(File);
if(isnull(inputtext) || strcmp(inputtext,Player[playerid][PlayerPassword]))
{
SendClientMessage(playerid,0,""RED">> Podałeś nieprawidłowe hasło.");
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Logowanie","Wpisz poniżej hasło do konta ktуre podałeś podczas rejestacji.","Ok","Anuluj");
return 1;
}
Server[ServerVisits] += 1;
Player[playerid][PlayerLoggedIn] = 1;
Player[playerid][PlayerVisits] += 1;
SendClientMessage(playerid,0,""GREEN">> Zalogowałeś się pomyślnie.");
}
if(!response)
{
format(String,150,""RED">> Gracz "DARK_RED"%s (%d) "RED"został wyrzucony z serwera. Powуd: Anulowanie logowania.",Player[playerid][PlayerName],playerid);
SendClientMessageToAll(0,String);
Kick(playerid);
}
}