20.12.2009, 06:53
ok I need help with dudb. I will show you parts of my admin FS:
Part of /register
OK here is disconnect:
it compiles with no errors but it is not saving Kills and Deaths in file. Any help?
Part of /register
Код:
if(!fexist(file))
{
dini_Create(file);
dini_IntSet(file, "Password", udb_hash(tmp));
dini_IntSet(file,"AdminLevel", 0);
dini_IntSet(file,"Cash", 0);
dini_IntSet(file,"Kills", 0);
dini_IntSet(file,"Deaths", 0);
dini_IntSet(file,"VIP", 0);
SendClientMessage(playerid, 0xFFA500FF, "Server: Account succesfully created, than you!");
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
GetPlayerName(playerid, name, sizeof(name));
printf("%s has registered a account!", name);
}
Код:
new string[256], pname[MAX_PLAYER_NAME]; new file[128];
format (file, sizeof(file), "%s.ini", pname);
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "2%s has left the server", pname);
ircSay(EchoConnection, EchoChan, string);
if(!fexist(file))
{
dini_IntSet(file, "Kills",PlayerInfo[playerid][Kills]);
dini_IntSet(file, "Deaths",PlayerInfo[playerid][Deaths]);
}
}

