Help with taxes
#4

I haven't tested it, but it should work:
pawn Код:
bool:LoadTax() // load TotalTaxPays amount, use it in OnGameModeInit
{
    new File:aFile = fopen("taxes.ini",io_read);
    if(!aFile) return false;
    new str[32];
    fread(aFile,str,sizeof(str));
    GlobalTaxPays = strval(str);
    fclose(aFile);
    return true;
}

bool:SaveTax() // save GlobalTaxPays amount, use it in OnGameModeExit
{
    new File:aFile = fopen("taxes.ini",io_write);
    if(!aFile) return false;
    new str[32];
    format(str,sizeof(str),"%d",GlobalTaxPays);
    fwrite(aFile,str);
    fclose(aFile);
    return true;
}
Reply


Messages In This Thread
Help with taxes - by Face9000 - 02.01.2012, 19:02
Re: Help with taxes - by Norck - 02.01.2012, 19:07
Re: Help with taxes - by Face9000 - 02.01.2012, 19:09
Re: Help with taxes - by Norck - 02.01.2012, 19:15
Re: Help with taxes - by Norck - 02.01.2012, 19:17
Re: Help with taxes - by Face9000 - 02.01.2012, 19:22

Forum Jump:


Users browsing this thread: 1 Guest(s)