01.09.2011, 21:17
If you are using a filterscript
At the register command
pawn Код:
new total_account; // at top of your script
public OnFilterScriptInit()
{
new File:totalAccount=fopen("totalAccount.ini", io_write);
if(!fexists(totalAccount)
{
fwrite(totalAccount, "total accounts = 0");
fclose(totalAccount);
}
return 1;
}
public OnFilterScriptExit()
{
new insert[50];
new File:totalAccount=fopen("totalAccount.ini", io_write);
format(insert, sizeof(insert), "total accounts = %d", total_account);
fwrite(totalAccount, insert);
fclose(totalAccount);
printf("New amount of registered accounts: %d", total_account);
return 1;
}
pawn Код:
total_account++;