newline[128],key[64],value[64];while(fread(file, line)){if(sscanf(line, \"p<=>s[64]s[64]\", key, value)) printf(\"Invalid INI format line\");else{printf(\"%s <--> %s\", key, value);}}
new File:TLGMWfileaka, filepath2[256], filename[17], filestring2[256], akastring[70], pName44[MAX_PLAYER_NAME], plrIP44[16]; GetPlayerName(playerid,pName44,MAX_PLAYER_NAME);GetPlayerIp(playerid, plrIP44, sizeof(plrIP44)); format(filename,sizeof(filename),\"tlgmultiwar/logok/aka/%s.txt\",plrIP44); if(fexist(filename)) { printf(\"létezik\"); TLGMWfileaka = fopen(filename,io_read); akabool=true; while(fread((fopen(filename,io_read)), akastring)) { printf(\"%s\",akastring); if(!strcmp(akastring, pName44), true)==1) { akabool=false; } } if(akabool==true) { fclose(TLGMWfileaka); TLGMWfileaka = fopen(filename,io_append); format(filestring2,sizeof(filestring2),\"%s\\r\\n\",pName44); fwrite(TLGMWfileaka,filestring2); fclose(TLGMWfileaka); printf(\"létrehozom\");}else if(akabool==false){ fclose(TLGMWfileaka);} } else { format(filepath2,sizeof(filepath2),\"tlgmultiwar/logok/aka/%s.txt\",plrIP44); TLGMWfileaka = fopen(filepath2,io_append); format(filestring2,sizeof(filestring2),\"%s\\r\\n\",pName44);fwrite(TLGMWfileaka,filestring2);fclose(TLGMWfileaka); }
stockteszt(){newbool:aka = true, File:F, str[256],pName[MAX_PLAYER_NAME], IP[16];// GetPlayerName(playerid, pName44, MAX_PLAYER_NAME);// GetPlayerIp(playerid, IP, sizeof(IP));IP = \"127.0.0.1\";pName = \"virgonc\";format(str, sizeof str, \"%s.txt\", IP); //tlgmultiwar/logok/aka/%s.txtF = fopen(str, io_readwrite);if(F){while(fread(F, str)){ StripNewLineY(str); if(!strcmp(str, pName, true)) { aka = false; break; }}if(aka){ format(str, sizeof str, \"%s\\r\\n\", pName); fwrite(F, str);} else { printf(\"Már mentett felhasználónév: %s IP: %s\", pName, IP);}fclose(F);} else {format(str, sizeof str, \"%s.txt\", IP); //\"tlgmultiwar/logok/aka/%s.txt\"F = fopen(str, io_write);format(str, sizeof str, \"%s\\r\\n\", pName);fwrite(F, str);fclose(F);}}stockStripNewLineY(str[]) //ysi_misc.own{newl = strlen(str);while (l-- && str[l] <= \' \') str[l] = \'\\0\';}
stock AkaEllenorzes(playerid){ new File:TLGMWfileaka, filepath2[256], filename[17], filestring2[256], akastring[MAX_PLAYER_NAME], pName44[MAX_PLAYER_NAME], plrIP44[16]; GetPlayerName(playerid,pName44,MAX_PLAYER_NAME);GetPlayerIp(playerid, plrIP44, sizeof(plrIP44)); format(filename,sizeof(filename),\"tlgmultiwar/logok/aka/%s.txt\",plrIP44); TLGMWfileaka = fopen(filename,io_readwrite); if(!fexist(filename)) { format(filepath2,sizeof(filepath2),\"tlgmultiwar/logok/aka/%s.txt\",plrIP44); format(filestring2,sizeof(filestring2),\"%s\\r\\n\",pName44);fwrite(TLGMWfileaka,filestring2);fclose(TLGMWfileaka); } else { akabool=true; while(fread(TLGMWfileaka, akastring)) { StripNewLineY(akastring); if(!strcmp(akastring, pName44, true)) { akabool=false; break; } } if(akabool==true) { format(filestring2,sizeof(filestring2),\"%s\\r\\n\",pName44); fwrite(TLGMWfileaka,filestring2);} }fclose(TLGMWfileaka);}
if(!fexist(filename)) {