Account id system
#9

pawn Код:
new string[4]; // Create the string to store the read text in
    new File:example = fopen("count.txt", io_write); // Open the file
    if(example) // If it opened successfully
    {
        fread(example, string); // Read a line from the file and store it in 'string'
        new count = strval( string ) + 1;
        PlayerAccountID = count;     /*You change this accordingly*/
        format(string, sizeof string, "%d", count );
        fwrite(example, string );
        fclose(example); // Close the file
        print(string); // Print what was read
    }
Not compiled, maybe someone can find a better way I am not very good with INI files.
Reply


Messages In This Thread
Account id system - by KillerStrike23 - 20.09.2014, 12:39
Re: Account id system - by DaniceMcHarley - 20.09.2014, 12:40
Re: Account id system - by KillerStrike23 - 20.09.2014, 12:43
Re: Account id system - by KillerStrike23 - 20.09.2014, 13:35
Re: Account id system - by DaniceMcHarley - 20.09.2014, 14:30
Re: Account id system - by KillerStrike23 - 20.09.2014, 20:02
Re: Account id system - by Marricio - 20.09.2014, 20:29
Re: Account id system - by KillerStrike23 - 20.09.2014, 20:32
Re: Account id system - by Marricio - 20.09.2014, 20:48
Re: Account id system - by KillerStrike23 - 20.09.2014, 20:51

Forum Jump:


Users browsing this thread: 4 Guest(s)