08.09.2012, 12:43
What about trying this
pawn Код:
CMD:login(playerid,params[])
{
if(!fexist(Path(playerid))) return SendClientMessage(playerid,-1,"You are not registered.");
if(isnull(params)) return ShowUsageMessage(playerid,"/login [Pass]");
new hashpass[129];
WP_Hash(hashpass,sizeof(hashpass),params);
if(!strcmp(params,pInfo[playerid][Pass]))
{
pLogged[playerid] = 1;
INI_ParseFile(Path(playerid),"loadaccount_%s",.bExtra = true, .extra = playerid);
SendClientMessage(playerid,-1,"Welcome back! You have successfully logged in");
}
else
{
SendClientMessage(playerid,-1,"ERROR: Wrong Pass");
}
return 1;
}