if(dialogid == 2)
{
if(!response)
{
StopAudioStreamForPlayer(playerid);
SendClientMessage(playerid, COLOR_SYSTEMRED, "( ! ) You must log in to play on this server. Please come again soon");
Kick(playerid);
gPlayerLogged[playerid] = 0;
}
new hashed_password[129];
WP_Hash(hashed_password, sizeof(hashed_password), inputtext);
if(!strcmp(hashed_password, dj(file, "Password")))
{
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_PASSWORD, "{FFFF00}Hopes Hills RPG Account", "{AF0000}Incorrect Password!\n{FFFFFF}Enter your Password", "Login", "Quit");
}
else
{
SendClientMessage(playerid, COLOR_GREEN, "( ! ) You have successfully Logged In!");
GivePlayerMoney(playerid, djInt(file, "Money"));
PlayerInfo[playerid][pBanned] = djInt(file, "Banned");
gPlayerLogged[playerid] = 1;
OnceLogged[playerid] = 1;
}
strcmp returns 0 on success, not 1. Remove that exclamation mark in the conditional and you should be set.
|
if(dialogid == 2)
{
if(!response)
{
StopAudioStreamForPlayer(playerid);
SendClientMessage(playerid, COLOR_SYSTEMRED, "( ! ) You must log in to play on this server. Please come again soon");
Kick(playerid);
gPlayerLogged[playerid] = 0;
}
new hashed_password[129];
WP_Hash(hashed_password, sizeof(hashed_password), inputtext);
if(strcmp(hashed_password, dj(file, "Password"), true))
{
SendClientMessage(playerid, COLOR_GREEN, "( ! ) You have successfully Logged In!");
GivePlayerMoney(playerid, djInt(file, "Money"));
PlayerInfo[playerid][pBanned] = djInt(file, "Banned");
gPlayerLogged[playerid] = 1;
OnceLogged[playerid] = 1;
}
else
{
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_PASSWORD, "{FFFF00}Hopes Hills RPG Account", "{AF0000}Incorrect Password!\n{FFFFFF}Enter your Password", "Login", "Quit");
}
if(dialogid == 2)
{
if(!response)
{
StopAudioStreamForPlayer(playerid);
SendClientMessage(playerid, COLOR_SYSTEMRED, "( ! ) You must log in to play on this server. Please come again soon");
Kick(playerid);
gPlayerLogged[playerid] = 0;
}
new hashed_password[129];
WP_Hash(hashed_password, sizeof(hashed_password), inputtext);
if(!strcmp(hashed_password, dj(file, "Password"), true))
{
SendClientMessage(playerid, COLOR_GREEN, "( ! ) You have successfully Logged In!");
GivePlayerMoney(playerid, djInt(file, "Money"));
PlayerInfo[playerid][pBanned] = djInt(file, "Banned");
gPlayerLogged[playerid] = 1;
OnceLogged[playerid] = 1;
}
else
{
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_PASSWORD, "{FFFF00}Hopes Hills RPG Account", "{AF0000}Incorrect Password!\n{FFFFFF}Enter your Password", "Login", "Quit");
}
pawn Код:
|
if(dialogid == 2)
{
if(!response)
{
StopAudioStreamForPlayer(playerid);
SendClientMessage(playerid, COLOR_SYSTEMRED, "( ! ) You must log in to play on this server. Please come again soon");
Kick(playerid);
gPlayerLogged[playerid] = 0;
}
new hashed_password[129];
WP_Hash(hashed_password, sizeof(hashed_password), inputtext);
printf("WP_Hash: %s | Data: %s", hashed_password, dj(file, "Password"));
if(!strcmp(hashed_password, dj(file, "Password"), true))
{
SendClientMessage(playerid, COLOR_GREEN, "( ! ) You have successfully Logged In!");
GivePlayerMoney(playerid, djInt(file, "Money"));
PlayerInfo[playerid][pBanned] = djInt(file, "Banned");
gPlayerLogged[playerid] = 1;
OnceLogged[playerid] = 1;
}
else
{
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_PASSWORD, "{FFFF00}Hopes Hills RPG Account", "{AF0000}Incorrect Password!\n{FFFFFF}Enter your Password", "Login", "Quit");
}
pawn Код:
|
---------- Loaded log file: "server_log.txt". ---------- SA-MP Dedicated Server ---------------------- v0.3d-R2, ©2005-2011 SA-MP Team [18:49:00] filterscripts = "" (string) [18:49:00] [18:49:00] Server Plugins [18:49:00] -------------- [18:49:00] Loading plugin: sscanf [18:49:00] [18:49:00] =============================== [18:49:00] sscanf plugin loaded. [18:49:00] © 2009 Alex "******" Cole [18:49:00] 0.3d-R2 500 Players "dnee" [18:49:00] =============================== [18:49:00] Loaded. [18:49:00] Loading plugin: Whirlpool [18:49:00] [18:49:00] ================== [18:49:00] [18:49:00] Whirlpool loaded [18:49:00] [18:49:00] ================== [18:49:00] [18:49:00] Loaded. [18:49:00] Loaded 2 plugins. [18:49:00] [18:49:00] Filterscripts [18:49:00] --------------- [18:49:00] Loaded 0 filterscripts. [18:49:00] ---------------------------------- [18:49:00] RPG Gamemode Loaded! [18:49:00] ---------------------------------- [18:49:00] Number of vehicle models: 0 [18:49:19] Incoming connection: 192.168.1.6:57031 [18:49:19] [join] krogsgaard20 has joined the server (0:192.168.1.6) [18:49:33] [part] krogsgaard20 has left the server (0:2) ---------- Loaded log file: "server_log.txt". ---------- SA-MP Dedicated Server ---------------------- v0.3d-R2, ©2005-2011 SA-MP Team [19:15:46] filterscripts = "" (string) [19:15:46] [19:15:46] Server Plugins [19:15:46] -------------- [19:15:46] Loading plugin: sscanf [19:15:46] [19:15:46] =============================== [19:15:46] sscanf plugin loaded. [19:15:46] © 2009 Alex "******" Cole [19:15:46] 0.3d-R2 500 Players "dnee" [19:15:46] =============================== [19:15:46] Loaded. [19:15:46] Loading plugin: Whirlpool [19:15:46] [19:15:46] ================== [19:15:46] [19:15:46] Whirlpool loaded [19:15:46] [19:15:46] ================== [19:15:46] [19:15:46] Loaded. [19:15:46] Loaded 2 plugins. [19:15:46] [19:15:46] Filterscripts [19:15:46] --------------- [19:15:46] Loaded 0 filterscripts. [19:15:46] ---------------------------------- [19:15:46] RPG Gamemode Loaded! [19:15:46] ---------------------------------- [19:15:46] Number of vehicle models: 0 [19:16:07] Incoming connection: 192.168.1.6:62980 [19:16:08] [join] krogsgaard20 has joined the server (0:192.168.1.6) [19:16:27] [part] krogsgaard20 has left the server (0:1) ---------- Loaded log file: "server_log.txt". ---------- SA-MP Dedicated Server ---------------------- v0.3d-R2, ©2005-2011 SA-MP Team [19:16:47] filterscripts = "" (string) [19:16:47] [19:16:47] Server Plugins [19:16:47] -------------- [19:16:47] Loading plugin: sscanf [19:16:47] [19:16:47] =============================== [19:16:47] sscanf plugin loaded. [19:16:47] © 2009 Alex "******" Cole [19:16:47] 0.3d-R2 500 Players "dnee" [19:16:47] =============================== [19:16:47] Loaded. [19:16:47] Loading plugin: Whirlpool [19:16:47] [19:16:47] ================== [19:16:47] [19:16:47] Whirlpool loaded [19:16:47] [19:16:47] ================== [19:16:47] [19:16:47] Loaded. [19:16:47] Loaded 2 plugins. [19:16:47] [19:16:47] Filterscripts [19:16:47] --------------- [19:16:47] Loaded 0 filterscripts. [19:16:47] ---------------------------------- [19:16:47] RPG Gamemode Loaded! [19:16:47] ---------------------------------- [19:16:47] Number of vehicle models: 0 [19:17:05] Incoming connection: 192.168.1.6:50650 [19:17:05] [join] krogsgaard20 has joined the server (0:192.168.1.6) [19:17:10] [part] krogsgaard20 has left the server (0:1) [19:17:13] --- Server Shutting Down.
Nothing unusual there.
Код:
---------- Loaded log file: "server_log.txt". ---------- SA-MP Dedicated Server ---------------------- v0.3d-R2, ©2005-2011 SA-MP Team [18:49:00] filterscripts = "" (string) [18:49:00] [18:49:00] Server Plugins [18:49:00] -------------- [18:49:00] Loading plugin: sscanf [18:49:00] [18:49:00] =============================== [18:49:00] sscanf plugin loaded. [18:49:00] © 2009 Alex "******" Cole [18:49:00] 0.3d-R2 500 Players "dnee" [18:49:00] =============================== [18:49:00] Loaded. [18:49:00] Loading plugin: Whirlpool [18:49:00] [18:49:00] ================== [18:49:00] [18:49:00] Whirlpool loaded [18:49:00] [18:49:00] ================== [18:49:00] [18:49:00] Loaded. [18:49:00] Loaded 2 plugins. [18:49:00] [18:49:00] Filterscripts [18:49:00] --------------- [18:49:00] Loaded 0 filterscripts. [18:49:00] ---------------------------------- [18:49:00] RPG Gamemode Loaded! [18:49:00] ---------------------------------- [18:49:00] Number of vehicle models: 0 [18:49:19] Incoming connection: 192.168.1.6:57031 [18:49:19] [join] krogsgaard20 has joined the server (0:192.168.1.6) [18:49:33] [part] krogsgaard20 has left the server (0:2) ---------- Loaded log file: "server_log.txt". ---------- SA-MP Dedicated Server ---------------------- v0.3d-R2, ©2005-2011 SA-MP Team [19:15:46] filterscripts = "" (string) [19:15:46] [19:15:46] Server Plugins [19:15:46] -------------- [19:15:46] Loading plugin: sscanf [19:15:46] [19:15:46] =============================== [19:15:46] sscanf plugin loaded. [19:15:46] © 2009 Alex "******" Cole [19:15:46] 0.3d-R2 500 Players "dnee" [19:15:46] =============================== [19:15:46] Loaded. [19:15:46] Loading plugin: Whirlpool [19:15:46] [19:15:46] ================== [19:15:46] [19:15:46] Whirlpool loaded [19:15:46] [19:15:46] ================== [19:15:46] [19:15:46] Loaded. [19:15:46] Loaded 2 plugins. [19:15:46] [19:15:46] Filterscripts [19:15:46] --------------- [19:15:46] Loaded 0 filterscripts. [19:15:46] ---------------------------------- [19:15:46] RPG Gamemode Loaded! [19:15:46] ---------------------------------- [19:15:46] Number of vehicle models: 0 [19:16:07] Incoming connection: 192.168.1.6:62980 [19:16:08] [join] krogsgaard20 has joined the server (0:192.168.1.6) [19:16:27] [part] krogsgaard20 has left the server (0:1) ---------- Loaded log file: "server_log.txt". ---------- SA-MP Dedicated Server ---------------------- v0.3d-R2, ©2005-2011 SA-MP Team [19:16:47] filterscripts = "" (string) [19:16:47] [19:16:47] Server Plugins [19:16:47] -------------- [19:16:47] Loading plugin: sscanf [19:16:47] [19:16:47] =============================== [19:16:47] sscanf plugin loaded. [19:16:47] © 2009 Alex "******" Cole [19:16:47] 0.3d-R2 500 Players "dnee" [19:16:47] =============================== [19:16:47] Loaded. [19:16:47] Loading plugin: Whirlpool [19:16:47] [19:16:47] ================== [19:16:47] [19:16:47] Whirlpool loaded [19:16:47] [19:16:47] ================== [19:16:47] [19:16:47] Loaded. [19:16:47] Loaded 2 plugins. [19:16:47] [19:16:47] Filterscripts [19:16:47] --------------- [19:16:47] Loaded 0 filterscripts. [19:16:47] ---------------------------------- [19:16:47] RPG Gamemode Loaded! [19:16:47] ---------------------------------- [19:16:47] Number of vehicle models: 0 [19:17:05] Incoming connection: 192.168.1.6:50650 [19:17:05] [join] krogsgaard20 has joined the server (0:192.168.1.6) [19:17:10] [part] krogsgaard20 has left the server (0:1) [19:17:13] --- Server Shutting Down. |