16.05.2010, 11:47
wops.. i only meant to write them once..
when i execute the code i get no response..
Can i use "break" to break the loop ?
then:
this code looks fucked up.. u have any other idea how to do it simplier or w/e ?
when i execute the code i get no response..
Can i use "break" to break the loop ?
then:
Код:
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;
}

