Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: CoD4 - openfile

  1. #11
    Private
    Join Date
    Jul 2012
    Posts
    76
    Thanks
    9
    Thanked 56 Times in 38 Posts
    Quote Originally Posted by BlancO View Post
    Are these stats server-side or client-side? (I mean can player edit his stats) (What is the path to it)
    Client-side. I tried editing stats in the past. Worked for like every mod-server. It's not like a simple .txt document which you can add manually. It's a .dat file I guess.

  2. #12
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by BlancO View Post
    Well, thanks a lot but I have few questions.

    Are these stats server-side or client-side? (I mean can player edit his stats) (What is the path to it)


    Is it correct?

    customStatsTable.csv
    PHP Code:
    3150,kills
    3151
    ,score
    3152
    ,connects
    3153
    ,spawns 
    .gsc script
    PHP Code:
    getDatadataName )
    {
        return 
    self getStatint(tableLookup"mp/customStatsTable.csv"1dataName)) );
    }

    setDatadataNamevalue )
    {
        
    self setStatint(tableLookup"mp/customStatsTable.csv"1dataName)), value );    
    }

    addDatadataNamevalue )
    {
        
    newValue getDatadataName ) + value;
        
    self setStatint(tableLookup"mp/customStatsTable.csv"1dataName)), newValue );    

    mod.csv
    PHP Code:
    stringtable,mp/customStatsTable.csv 
    The data file is stored client-side, @[COD4 INSTALL]/players/PROFILE NAME/mods/mod_folder name/mpdata

    The data file is encrypted, but the encryption algorithm is now well known, and if you have the cheat-engine, you can edit them quite easily. However, not everyone understands it, so it's not like any old noob can open it like a text file and edit it.

    And yes - you have everything correct. That should work for you nicely. Just a word of warning about using the setStat()/getStat() functions - don't do too much of it onPlayerConnect(). You will run into a notorious server crash problem - the server command overflow. This is caused by too many players using the setStat()/getStat() functions at the same time if you have >= 24 players joining the server at the same time. Try to move stuff you are doing at onPlayerConnect() to onJoinedTeam(), or better yet, onPlayerSpawned(). That way you can avoid the build-up of pending server commands.

    If you usually have less than 24 players, that's fine. It is only on big servers it happens a lot.

    If you have any other questions about COD4, don't hesitate to ask. I was on the mod tools team and helped build them. So, I kind of know quite a bit about how it all works, etc.

    Here is a picture of me, out at the Infinity Ward Studio for the launch of COD4:

    Last edited by Tally; 18th September 2013 at 17:04.

  3. The Following 3 Users Say Thank You to Tally For This Useful Post:

    BlancO (18th September 2013),kung foo man (18th September 2013),YuriJurek (18th September 2013)

  4. #13
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    Lol that guy with the flipflops....

  5. The Following 4 Users Say Thank You to Ni3ls For This Useful Post:

    BlancO (18th September 2013),EvoloZz (18th September 2013),kung foo man (18th September 2013),YuriJurek (18th September 2013)

  6. #14
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by Ni3ls View Post
    Lol that guy with the flipflops....
    That's GaretJax - creator of COD TV and PAM mod for COD1 and UO.

  7. The Following User Says Thank You to Tally For This Useful Post:

    kung foo man (18th September 2013)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •