Need Help In Register/Login System
#9

i added this in the top of the script

Код:
#define DIALOG_REGISTER 1
#define DIALOG_LOGIN 2
#define DIALOG_SUCCESS_1 3
#define DIALOG_SUCCESS_2 4

#define PATH "scriptfiles/Users/%s.ini"

#define COL_WHITE "{FFFFFF}"
#define COL_RED "{F81414}"
#define COL_GREEN "{00FF22}"
#define COL_LIGHTBLUE "{00CED1}"

enum pInfo
{
    pPass,
    pCash,
    pAdmin,
    pKills,
    pDeaths
}
new PlayerInfo[MAX_PLAYERS][pInfo];

forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
    INI_Int("Password",PlayerInfo[playerid][pPass]);
    INI_Int("Cash",PlayerInfo[playerid][pCash]);
    INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
    INI_Int("Kills",PlayerInfo[playerid][pKills]);
    INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
    return 1;
}

stock UserPath(playerid)
{
    new string[128],playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid,playername,sizeof(playername));
    format(string,sizeof(string),PATH,playername);
    return string;
}

/*Credits to Dracoblue*/
stock udb_hash(buf[]) {
    new length=strlen(buf);
    new s1 = 1;
    new s2 = 0;
    new n;
    for (n=0; n<length; n++)
    {
       s1 = (s1 + buf[n]) % 65521;
       s2 = (s2 + s1)     % 65521;
    }
    return (s2 << 16) + s1;
}
Reply


Messages In This Thread
Need Help In Register/Login System - by kyriakos587 - 23.06.2015, 08:27
Re: Need Help In Register/Login System - by AndySedeyn - 23.06.2015, 08:30
Re: Need Help In Register/Login System - by kyriakos587 - 23.06.2015, 08:32
Re: Need Help In Register/Login System - by ]Rafaellos[ - 23.06.2015, 08:42
Re: Need Help In Register/Login System - by kyriakos587 - 23.06.2015, 08:47
Re: Need Help In Register/Login System - by AndySedeyn - 23.06.2015, 08:51
Re: Need Help In Register/Login System - by kyriakos587 - 23.06.2015, 08:53
Re: Need Help In Register/Login System - by AndySedeyn - 23.06.2015, 09:01
Re: Need Help In Register/Login System - by kyriakos587 - 23.06.2015, 09:04
Re: Need Help In Register/Login System - by Sithis - 23.06.2015, 09:19

Forum Jump:


Users browsing this thread: 1 Guest(s)