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]); } }
if(!fexist(file)) { printf("FindBug: File: %s Kills: %d Deaths: %d",file,PlayerInfo[playerid][Kills],,PlayerInfo[playerid][Deaths]); dini_IntSet(file, "Kills",PlayerInfo[playerid][Kills]); dini_IntSet(file, "Deaths",PlayerInfo[playerid][Deaths]); }
new MyKills[MAX_PLAYERS];
new MyDeaths[MAX_PLAYERS];
MyDeaths[playerid]++;
MyKills[killerid]++;
if(MyKills[playerid] == ++ )//then add here your function of writing to folder
if(MyDeaths[killerid] == ++ ) //then add here your function of writing to folder
Originally Posted by Ironboy500
Tried, not showing that text in samp-server.exe.
|
Originally Posted by lrZ^ aka LarzI
A simple mistake...
Remove the '!' from the last fexist check. You don't wanna save if the file isn't found, lol. |
if(fexist(file)) // he is right, remove the ! { printf("FindBug: File: %s Kills: %d Deaths: %d",file,PlayerInfo[playerid][Kills],,PlayerInfo[playerid][Deaths]); dini_IntSet(file, "Kills",PlayerInfo[playerid][Kills]); dini_IntSet(file, "Deaths",PlayerInfo[playerid][Deaths]); }