Results 1 to 10 of 14

Thread: CoD4 - openfile

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Private
    Join Date
    Jul 2012
    Posts
    76
    Thanks
    9
    Thanked 56 Times in 38 Posts
    Yup, that actually should work.

    Though I would recommend using it like this.

    PHP Code:
    self maps\mp\gametypes\_persistence::statSet("kills"0);
    kills self maps\mp\gametypes\_persistence::statGet("kills"); 
    Also you have the statAdd() function.
    For example:
    PHP Code:
    self maps\mp\gametypes\_persistence::statAdd("kills"1); 
    This would add 1 killpoint to the existing ones.
    It's a bit shorter than
    PHP Code:
     curValue self maps\mp\gametypes\_persistence::statGet("kills");
    self maps\mp\gametypes\_persistence::statSet("kills"curValue+1); 
    Here are two links which might help you:
    http://www.se7ensins.com/forums/thre...tstats.426961/
    http://braxi.org/forum/archive/index...read-1489.html

    The very big problem about stats is that they are not saved on the server, but on the client's PC. So it's kind of easy to hack and fake stats. So I'd rather recommend you mysql to be honest.
    Last edited by Peterlankton; 17th September 2013 at 23:07.

  2. The Following 2 Users Say Thank You to Peterlankton For This Useful Post:

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

  3. #2
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by Peterlankton View Post
    Yup, that actually should work.

    Though I would recommend using it like this.

    PHP Code:
    self maps\mp\gametypes\_persistence::statSet("kills"0);
    kills self maps\mp\gametypes\_persistence::statGet("kills"); 
    Also you have the statAdd() function.
    For example:
    PHP Code:
    self maps\mp\gametypes\_persistence::statAdd("kills"1); 
    This would add 1 killpoint to the existing ones.
    It's a bit shorter than
    PHP Code:
     curValue self maps\mp\gametypes\_persistence::statGet("kills");
    self maps\mp\gametypes\_persistence::statSet("kills"curValue+1); 
    Here are two links which might help you:
    http://www.se7ensins.com/forums/thre...tstats.426961/
    http://braxi.org/forum/archive/index...read-1489.html

    The very big problem about stats is that they are not saved on the server, but on the client's PC. So it's kind of easy to hack and fake stats. So I'd rather recommend you mysql to be honest.
    No, it wont work - getStat() and setStat() only works with numbers (integers).

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
  •