Pajungiu serverį ant pc bandau prisijungti, įeinu į serverį ir va nemeta login. Gamemode surištas su MySQL. http://www.part.lt/img/125818b328eda0eb4167211b46ecb6c5293.png
if(dialogid == RegisterDialog)
{
if(response)
{
if(strfind(inputtext,"%",true)!= -1)//patikrinam ar ivestame inputtext'e nera klaustuko
{
SendClientMessage(playerid,0xFF0000,"Procento naudoti negalima!");
ShowPlayerDialog(playerid, RegisterDialog, DIALOG_STYLE_PASSWORD, "{F2F2F2}Saskaitos registracija", "{FF0000}NEIVEDETE SLAPTAZODZIO\n{F2F2F2}iveskite slaptazodi, kad uzregistruotumete saskaita", "Registruotis", "Iseiti");
}
if(strlen(inputtext) < 3)
{
ShowPlayerDialog(playerid, RegisterDialog, DIALOG_STYLE_PASSWORD, "{F2F2F2}Saskaitos registracija", "{FF0000}NEIVEDETE SLAPTAZODZIO\n{F2F2F2}iveskite slaptazodi, kad uzregistruotumete saskaita", "Registruotis", "Iseiti");
}
else
{
new query[200],playerName[ MAX_PLAYER_NAME ],String[256],PlayerIP[50];
GetPlayerIp(playerid, PlayerIP, sizeof(PlayerIP));
GetPlayerName(playerid,playerName,MAX_PLAYER_NAME);
format(query,200,"INSERT INTO players (Vardas,Password,IP) VALUES ('%s','%s','%s')",playerName,inputtext,PlayerIP);
mysql_query(query);
SendClientMessage(playerid,-1,"Jūs sėkmingai užregistruotas!");
pDB[playerid][Newbie] = 1;
pDB[playerid][LoggedIn] = 2;
Logged[playerid] = 1;
format(String, sizeof(String), "{F2F2F2}Saskaita vardu: {FF0000}%s {F2F2F2}sukurta ir jus automatiskai prijungtas prie zaidimo.\nNoredami pradeti zaidima spauskite mygtuka: {FF0000}Spawn arba Shift", PlayerName(playerid));
format(String, sizeof(String), "{{00A200} >>>>>>>>>>> {FFFFFF}www.eSFG.LT.{501FA5}LT ", PlayerName(playerid));
format(String, sizeof(String), "{00A200} >>>>>>>>>>> {FFFFFF}Sveiki, atvyke i eSFG.LT serverį.", PlayerName(playerid));
format(String, sizeof(String), "{00A200} >>>>>>>>>>> {FFFFFF} www.eSFG.{501FA5}LT", PlayerName(playerid));
ShowPlayerDialog(playerid, RegisterInfoDialog, DIALOG_STYLE_MSGBOX, "{F2F2F2}Saskaita sukurta", String, "Toliau!", "");
}
}
if(!response)
{
ShowPlayerDialog(playerid, ExitRegisterOrLoginDialog, DIALOG_STYLE_MSGBOX, "{F2F2F2}Saskaita butina", "{F2F2F2}Deja, registracija yra butina norint zaisti.\nPaspaude {FF0000}Uzdaryti!{F2F2F2} busite ismestas is serverio.", "Uzdaryti!", "");
}
return 1;
}
if(dialogid == ExitRegisterOrLoginDialog)
{
Kick(playerid);
return 1;
}
if(dialogid == LoginDialog)
{
if(response)
{
new query[200],playerName[ MAX_PLAYER_NAME ],String[256];
GetPlayerName(playerid,playerName,MAX_PLAYER_NAME);
format(query,200,"SELECT Vardas,Password FROM players WHERE Vardas='%s' AND Password='%s'",playerName,inputtext);
mysql_query(query);
mysql_store_result();
new rows = mysql_num_rows();
mysql_free_result();
if(rows == 1)
{
format(String, sizeof(String), ""#COL_INFO"( INFO ): {AEB404}%s "#COL_INFO"Prisijungė į žaidima!", PlayerName(playerid));
for(new i = 0; i < MAX_PLAYERS_IN_SERVER; i ++)
{
if(pDB[i][Admin] >= 1)
{
SendClientMessage(i, -1, String);
}
}
SendClientMessage(playerid,-1,"Sėkmingai prisijungėte į eSFG.LT serverį!");
SendClientMessage(playerid,-1,"Linkime gero ir malonaus žaidimo!");
Logged[playerid] = 1;
pDB[playerid][LoggedIn] = 1;
new playersip[24];
GetPlayerIp(playerid, playersip, sizeof(playersip));
new playername2[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername2, sizeof(playername2));
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(String,sizeof(String), "[%d/%d/%d] [%d:%d:%d] %s IP ira: %s.",d,m,y,h,mi,s,playername2,playersip);
LoginLog(String);
}
else
{
pDB[playerid][FailedPasswordCount] ++;
if(pDB[playerid][FailedPasswordCount] >= 3)
{
format(String, sizeof(String), ""#COL_WHITE"[Sistema]: {FF0000}%s "#COL_GREEN"išmestas iš serverio todėl, kad 3 kartus įvedė neteisingą slaptažodį", PlayerName(playerid));
SendClientMessageToAll(-1, String);
Kick(playerid);
}
ShowPlayerDialog(playerid, LoginDialog, DIALOG_STYLE_PASSWORD, "{F2F2F2}eSFG.LT Prisijungimas", "{FF0000}SLAPTAŽODIS NETEISINGAS!\n{F2F2F2}Bandykite prisijungti dar kartą.", "Prisijungti", "Iseiti");
}
}
if(!response)
{
Kick(playerid);
}
return 1;
}
Norėdamas rašyti pranešimą privalai prisijungti arba užsiregistruoti!
Šita tema neturi atsakymų! Būk pirmas!