zGaming RP script help. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: zGaming RP script help. (
/showthread.php?tid=476882)
zGaming RP script help. -
Socan - 20.11.2013
So if youve used the zGaming script youve more then likely realised that you can log in with a fake password, and dont even need to put in the proper pass.
Does anyone know how to fix this?
Код:
new file[64], password[256], IP[16], password2[256];
format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
WP_Hash(password2, sizeof(password2), inputtext);
format(password, sizeof(password), "%s", dini_Get(file, "Password"));
if(!strcmp(PlayerInfo[playerid][Password], inputtext , false))
{
SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER: {FFFFFF}Invalid password.");
ShowDialog(playerid, 2);
return 1;
}
Re: zGaming RP script help. -
Krakuski - 21.11.2013
Try this.
pawn Код:
new file[64], password[256], IP[16], password2[256];
format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
WP_Hash(password2, sizeof(password2), inputtext);
format(password, sizeof(password), "%s", dini_Get(file, "Password"));
if(strcmp(password, inputtext,true) && strcmp(password, password2, true))
{
SendClientMessage(playerid, COLOR_RED, "SERVER: {FFFFFF}Invalid password.");
ShowDialog(playerid, 2);
return 1;
}