Understanding MySQL
#8

Quote:
Originally Posted by doreto
Посмотреть сообщение
So what you will do now spamm wichout code great thinkin?
I said teamviewer?
anyways, codes
pawn Код:
#define               PATH "/Administration/Users/%s.ini"

enum pInfo
{
    pPass,
    pCash,
    pScore,
    pAdminLevel,
    pKills,
    pDeaths,
    pBanned
}
new PlayerInfo[MAX_PLAYERS][pInfo];

public LoadUser_data(playerid,name[],value[])
{
    INI_Int("Password",PlayerInfo[playerid][pPass]);
    INI_Int("Score",PlayerInfo[playerid][pScore]);
    INI_Int("Cash",PlayerInfo[playerid][pCash]);
    INI_Int("AdminLevel",PlayerInfo[playerid][pAdminLevel]);
    INI_Int("Kills",PlayerInfo[playerid][pKills]);
    INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
    INI_Int("Banned",PlayerInfo[playerid][pBanned]);
    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;
}

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
Understanding MySQL - by _Khaled_ - 01.09.2012, 12:03
Re: Understanding MySQL - by _Khaled_ - 01.09.2012, 13:18
Re: Understanding MySQL - by Cjgogo - 01.09.2012, 13:22
Re: Understanding MySQL - by _Khaled_ - 01.09.2012, 13:36
Re: Understanding MySQL - by _Khaled_ - 01.09.2012, 13:57
Re: Understanding MySQL - by doreto - 01.09.2012, 14:00
Re: Understanding MySQL - by Jarnu - 01.09.2012, 14:26
Re: Understanding MySQL - by _Khaled_ - 01.09.2012, 14:56
Re: Understanding MySQL - by CoDeZ - 01.09.2012, 15:07
Re: Understanding MySQL - by _Khaled_ - 01.09.2012, 15:09

Forum Jump:


Users browsing this thread: 1 Guest(s)