18.04.2015, 14:20
PHP код:
public SalvarAdmins()
{
new idx;
new File: file2;
while (idx < sizeof(AdmInfo))
{
new coordsstring[256];
format(coordsstring, sizeof(coordsstring), "%s,%d|\n",AdmInfo[idx][AdminNome],AdmInfo[idx][AdminNivel]);
if(idx == 0)
{
file2 = fopen("Configs/Admins.cfg", io_write);
}
else
{
file2 = fopen("Configs/Admins.cfg", io_append);
}
fwrite(file2, coordsstring);
idx++;
fclose(file2);
}
return 1;
}