Results 1 to 6 of 6
  1. #1
    Corey Taylor's Avatar
    Join Date
    Mar 2009
    Gender
    female
    Posts
    37
    Reputation
    10
    Thanks
    0

    Function Variables?

    I've been seeing lines like this around:
    Code:
    [[game[team+"_model"]["ASSAULT"]]]();
    Are theses invoked functors? I wish I knew how to to use them. I'm doing heavy modifications to quarantine chaos zombie mod and I need rearrange shop items.

  2. #2
    xbeatsszzx's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Location
    Behind a dumpster jerking off. xD jks
    Posts
    2,519
    Reputation
    13
    Thanks
    1,508
    My Mood
    Asleep
    U know theres a section for this kinda stuff, its the gsc modding help/discussion something like that.
    I Am on this site for the mods for mw2 ONLY. Not hacks.

  3. #3
    Corey Taylor's Avatar
    Join Date
    Mar 2009
    Gender
    female
    Posts
    37
    Reputation
    10
    Thanks
    0
    Oh snap can someone love this topic please? Thank you.

  4. #4
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,858
    Reputation
    3438
    Thanks
    101,662
    My Mood
    Breezy
    Well if you do a search, you will find those are just variables that link to a thread.

    Example (from Black Ops):
    Code:
    [[level.callbackStartGameType]]();
    level.callbackStartGameType = maps\mp\gametypes\_globallogic::Callback_StartGameType;
    Example for your case:
    Code:
    game[team + "_model"]["SNIPER"] = mptype\mptype_tf141_desert_sniper::main;
    game[team + "_model"]["LMG"] = mptype\mptype_tf141_desert_lmg::main;
    game[team + "_model"]["ASSAULT"] = mptype\mptype_tf141_desert_assault::main;
    game[team + "_model"]["SHOTGUN"] = mptype\mptype_tf141_desert_shotgun::main;
    game[team + "_model"]["SMG"] = mptype\mptype_tf141_desert_smg::main;
    game[team + "_model"]["RIOT"] = mptype\mptype_tf141_desert_riot::main;
    As I said above, those are just variables that link to a function.
    Last edited by master131; 01-08-2011 at 07:27 PM.
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.7.3
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

  5. The Following User Says Thank You to master131 For This Useful Post:

    FlaXxy (05-07-2011)

  6. #5
    Corey Taylor's Avatar
    Join Date
    Mar 2009
    Gender
    female
    Posts
    37
    Reputation
    10
    Thanks
    0
    Do you instantiate the function as a thread before assigning it? Why can't I do this?
    Code:
    foo(){}
    bar()
    {
    baz = foo;
    [[baz]]();
    }
    Or do you need to associate an object to the assignment before the invocation? Or does it need to be declared as a thread all together?

  7. #6
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,858
    Reputation
    3438
    Thanks
    101,662
    My Mood
    Breezy
    I have no idea but you may have to delcare the thread globally and not locally.
    Code:
    baz = maps\mp\gametypes\_rank::foo;
    [[baz]]();
    EDIT - Just found out, if you want to load a function from the same file, you have to do this:
    Code:
    baz = ::foo;
    [[baz]]();
    Otherwise if you want to link to a function from another file:
    Code:
    baz = maps\mp\gametypes\_rank::foo;
    [[baz]]();
    To pass arguments through to the desired function you put them inside the brackets before the semi-colon.
    Last edited by master131; 01-08-2011 at 07:40 PM.
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.7.3
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

  8. The Following User Says Thank You to master131 For This Useful Post:

    FlaXxy (05-07-2011)