01.08.2010, 22:15
also it works fine.. i dont think i need that above just the else part isnt working i think
password is anything. string/integer
it says i logged in but it doesnt actually logg me in
also my login cmd if it helps
password is anything. string/integer
it says i logged in but it doesnt actually logg me in
also my login cmd if it helps
pawn Код:
CMD:login(playerid, params[])
{
new ppw[20], str[128];
format(pfile, sizeof(pfile), pfile_path, Playername(playerid));
if(sscanf(params, "s", ppw)) return SendMsg(playerid, RED, "*USAGE: /register [password] - Max length is 20 & minium is 3");
if(strlen(ppw) <= 3) return SendMsg(playerid, RED, "*Error: Password Is Under The Limit Sorry");
if(strlen(ppw) >= 19) return SendMsg(playerid, RED, "*Error: Password Is Over The Limit Sorry");
if(IsLogged[playerid] == 1) return SendMsg(playerid, RED, "*Error: |- You Are Already Logged In -|");
if(!dini_Exists(pfile)) return SendMsg(playerid, RED, "*Error: No account with that username is registered, please register");
if(strcmp(dini_Get(pfile, "Password"), ppw, true) != 0) return SendMsg(playerid, RED, "*Error: Wrong Password. Password Did Not Match With The One You Have Register With.");
format(str, sizeof(str), "*Success: You have Successfully Logged In %s", Playername(playerid), dini_Int(pfile, "AdminLevel"));
SendMsg(playerid, LIME, str);
LoadPlayer(playerid);
IsLogged[playerid] = 1;
SetTimerEx("TimePlayerLogged", 1000, true, "i", playerid);
Invited[playerid] = -1;
InHouse[playerid] = -1;
House[playerid] = -1;
new Pname[24], File[65]; GetPlayerName(playerid, Pname, 24);
for(new V=0; V<HouseCount + 1; V++)
{
if(!strcmp(HouseInfo[V][HouseOwner], Pname, true))
{
House[playerid] = V;
break;
}
}
if(dini_Exists(File))
{
for(new K=0; K<HouseCount + 1; K++)
{
format(File, sizeof(File), "HouseKeys/%s.ini", HouseInfo[K][HouseNames]);
if(dini_Int(File, Pname) == 1) Keys[playerid][K] = 1;
}
}
return 1;
}