Results 1 to 5 of 5

Thread: SourceOP credits database conversion

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    TESLA-X4's Avatar



    Join Date
    Jan 11, 2010
    Last Online
    Jan 12, 2010
    Posts
    3
    Threads
    1



    SourceOP credits database conversion


    Hi all, I'd like to know if there's a way to convert the SourceOP credits database into another format (e.g. SQLite)? The rationale behind it being that some features such as buying a single gun are not implemented, and that expanding the use of credits is currently impossible.

    Thanks.

  2. #2
    Drunken F00l's Avatar



    Join Date
    Dec 11, 2004
    Last Online
    Jun 11, 2019
    Posts
    5,874
    Threads
    182
    Reputation
    SourceOP Thread


        
    Steam: 76561197968459473 
    Steam join date: Aug 23, 2004
    Steam Level: 56
    Profile Status: Public



    To convert once? Maybe. I can give you the format if it helps.

    If you want SourceOP to actually read and save to SQLite, then you're out of luck.

  3. #3
    TESLA-X4's Avatar



    Join Date
    Jan 11, 2010
    Last Online
    Jan 12, 2010
    Posts
    3
    Threads
    1




    Yeah, I just need to convert the database once. Cheers.

  4. #4
    Drunken F00l's Avatar



    Join Date
    Dec 11, 2004
    Last Online
    Jun 11, 2019
    Posts
    5,874
    Threads
    182
    Reputation
    SourceOP Thread


        
    Steam: 76561197968459473 
    Steam join date: Aug 23, 2004
    Steam Level: 56
    Profile Status: Public



    There's a version header followed by credits entries until the end of the file.

    Version header (type should be SOPCRED, ver should be 1):
    Code:
    typedef struct creditsver_s
    {
        char        type[12];
        int         ver;
    } creditsver_t;

    Credits entry:
    Code:
    typedef struct credits_t
    {
        char            szSteamID[24];  //player's SteamID
        int             credits;        //amount of credits
        int             timeonserver;   //the time the player has been on the server
        unsigned long   lastsave;       //time in seconds since UTC 1/1/70
        int             totalconnects;  //previously total credits
        int             iuser1;         //stores flags
        char            emptyspace[64]; //for future use
        char            FirstName[36];  //stores the player's first ever name used
        char            LastName[36];   //stores the player's last used name
        char            CurrentName[36];//stores the player's name during save
    } credits_t;

  5. #5
    TESLA-X4's Avatar



    Join Date
    Jan 11, 2010
    Last Online
    Jan 12, 2010
    Posts
    3
    Threads
    1




    Sweet, thanks DF!

Tags for this Thread