01.09.2012, 14:56
I said teamviewer?
anyways, codes
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;
}