19.06.2013, 15:45
i have a SQL based server, and used vortex 2 based GM (modified for own purpose), the new user cant register, they just stuck after input the password into register dialog, but when i tried in my localhost, it works perfectly, any help ?
this is the code after player input the password
this is the code after player input the password
pawn Код:
case THREAD_CHECK_CREDENTIALS: {
mysql_store_result();
if(!IsPlayerConnected(extraid)) return mysql_free_result(); // Incase they're disconnected since... Sometimes queries F*"!%$" up.
if(mysql_num_rows() == 0) { // INCORRECT PASSWORD!1
SetPVarInt(extraid, "LA", GetPVarInt(extraid, "LA") + 1);
new
string[128],
playerIP[32];
if(GetPVarInt(extraid, "LA") > MAX_LOGIN_ATTEMPTS) {
SendClientMessage(extraid, COLOR_RED, "Anda telah menggunakan beberapa cara untuk login");
GetPlayerIp(extraid, playerIP, sizeof(playerIP));
GetPlayerName(extraid, szPlayerName, MAX_PLAYER_NAME);
format(string, sizeof(string), "AdmWarn: {FFFFFF}IP %s telah di ban (%d 3 kali salah dalam memasukan password %s).", playerIP, MAX_LOGIN_ATTEMPTS, szPlayerName);
submitToAdmins(string, COLOR_HOTORANGE);
IPBan(playerIP, "Melebihi upaya login maksimum.",szPlayerName);
KickWithMessage(extraid);
return 1;
}
else {
ShowPlayerDialog(extraid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "SERVER: Login", "Selamat datang di "SERVER_NAME" Server.\n\nSilakan masukkan password Anda di bawah ini!", "Login", "Cancel");
format(string, sizeof(string), "Password salah. Anda memiliki %d kesempatan untuk login.", MAX_LOGIN_ATTEMPTS - GetPVarInt(extraid, "LA"));
SendClientMessage(extraid, COLOR_HOTORANGE, string);
return 1;
}
}
else {
clearScreen(extraid);
DeletePVar(extraid, "LA");
SendClientMessage(extraid, COLOR_RED, "debug 1 sukses"); //this message was appear, then the rest of the code is just like not running
mysql_retrieve_row();
mysql_get_field("playerBanned", result);
if(strval(result) >= 1) {
new
playerIP[32],
string[120];
SendClientMessage(extraid, COLOR_RED, "Anda telah di BAN dari server");
GetPlayerIp(extraid, playerIP, sizeof(playerIP));
GetPlayerName(extraid, szPlayerName, MAX_PLAYER_NAME);
format(string, sizeof(string), "AdmWarn: {FFFFFF}%s telah berusaha untuk menghindari banned (ban evading) (using IP %s).", szPlayerName, playerIP);
submitToAdmins(string, COLOR_HOTORANGE);
format(string, sizeof(string), "Percobaan ban sementara (%s).", szPlayerName);
IPBan(playerIP, string, szPlayerName);
KickWithMessage(extraid);
}
playerVariables[extraid][pBanned] = strval(result);
mysql_get_field("playerPassword", playerVariables[extraid][pPassword]);
mysql_get_field("playerEmail", playerVariables[extraid][pEmail]);
etc its just how i load datas and then spawn the player