stock pAddGateKeys(name[], faction)
{
new filestr[128],string[128];
if(faction == 0) return 1;
if(faction == 1){format(string,sizeof(string),"D-RP/Factions/LSPD_Keys.cfg");}
new File:file = fopen(string,io_append);
if (file)
{
while(fread(file,filestr,sizeof(filestr)))
{
if (strfind(filestr, name, true) != -1)
{
}
else
{
format(string,128,"%s\r\n", name);
fwrite(file,string);
}
}
}
fclose(file);
return 1;
}

|
Originally Posted by [ZDM
jumbo ]
if((file = fopen("file...i",io_append))) ![]() ![]() |
|
Originally Posted by MafiaGuy™
bump
|
« Reply #3 on: May 15, 2010, 06:28:07 pm »
« Reply #4 on: Today at 08:41:14 am »

while(fread(file,filestr,sizeof(filestr)))
{
if (strfind(filestr, name, true) != -1)
{
}
else
{
format(string,128,"%s\r\n", name);
fwrite(file,string);
}
}
stock pAddGateKeys(name[], faction)
{
new filestr[128],string[128];
if(faction == 0) return 1;
if(faction == 1){format(string,sizeof(string),"D-RP/Factions/LSPD_Keys.cfg");}
new File:file = fopen(string,io_append);
if (file)
{
while(fread(file,filestr,sizeof(filestr)))
{
if (strfind(filestr, name, true) != -1)
{
}
else
{
format(string,128,"%s\r\n", name);
fwrite(file,string);
break;
}
}
}
fclose(file);
return 1;
}