1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

GSC Managed Code List By iTahhr

Discussion in 'Call of Duty: Black Ops 2 Scripts' started by iTahhr, May 26, 2016.

Tags:
  1. iTahhr

    iTahhr Well-Known Member

    234
    115
    43
    Credits:
    234
    iTahhr's Managed Code List

    NOTE: I do not claim to be the best coder so if i make any mistakes please correct me down below or send me a pm telling me what i could add or improve to this tutorial thread, thanks!

    Symbols and includes:
    Q: What is symbols and includes?
    A: Symbols and includes are useful for if statements and some other stuff.
    Examples:
    Code:
    if(self.origin[0] >= 100)//Checks to see if your origin is the same as "100,342,22"
    self iprintln("you're more than or equal to 100");
    Symbols and includes:
    Code:
    > means more than[/LEFT]
    < means less than
    == means equals
    >= means more than or equal
    <= means less than or equals
    != means not equal
    || means or
    && means and
    Variable:
    Q: What are Variables used for?
    A: Variables are used to store information.
    Examples:
    Code:
    Variable = "Lets Learn Together";
    
    if(Variable == "Lets Learn Together")
            self iprintln("Continue Code");
    Variable:
    Code:
    Variable = "Lets Learn Together";
    Floats and int's:
    Q: What are Floats and int's?
    A: Floats and ints change Variables to values.
    Examples:
    Code:
    time = strTok(".5,.5,.2,.2,.1,.05", ",");
    for(Ext = 0; Ext < 6; Ext++)
    {
        wait float(time[Ext]);
    }
    Int's are used the same way but you only use ints when you aren't using decimals.
    Floats and int's:
    Code:
    float(time[Ext]);
    int(time[Ext]);
    Strtok:
    Q: What are Strtok used for?
    A: Strtok is used to store data until it is being called.
    Examples:
    Code:
    So lets make it count to 10, always remember in gsc the first value will always be 0 so if you want to count to 10 you would do, Ext = 0; Ext <9; Ext++ in a loop.
    Example = strTok("1,2,3,4,5,6,7,8,9,10", ",");
    for(Ext = 0; Ext < 9; Ext++)
    {
        self iprintln("Current Num: ^2" + Example[Ext]);
        wait .2;
    }
    Strtok:
    Code:
    Example = strTok(" ", ",");
    Words/Commands:
    Q: Why are these useful?
    A: These are usful since you can end loops easily etc.
    Examples:
    Code:
    if(self useButtonPressed())
    break;
    Words/Commands:
    Code:
    break; means terminate/end. 
    return; means terminate and reurn to called function. 
    continue; means continue.
    Clean Code:
    Q: Why should we clean our code if it works?
    A: Clean code means better code since people will be able to read it if you are having issues.
    Examples:
    Code:
    if(self.variable ) //means if true
    self iprintln("variable is currently False");
    Clean Code:
    Code:
    if(self.variable ) //means if true
    if(!self.variable ) //means if false
    
    1    2
    true    false
    Fixing Overflows:
    Q: Overflows suck but they're hard to fix?
    A: Yes overflows do suck but they are simple to fix.
    Notes:
    Code:
    Make sure everything is getting fixed as "player"!
    Fixing Values: setValue
    Fixing Normal Text: setSafeText
    Examples:
    Code:
    if(isDefined(player.FuncVariableHere))
    {
        player.Ext["Tuts"] = setSafeText("Hello CCM");
        player.Ext["MainTut"] = setSafeText("Welcome To...");
    }
    Fixing Overflows:
    Code:
    if(isDefined(player.FuncVariableHere))
    {
        //Fixing Text Here
    }
    Fonts:
    Q: The default font is good enough?
    A: Yes the font is good but you might like a different one better.
    Example:
    Code:
    self.Ext["Txt"] = drawText("Hiya xoxo", "FONT HERE PLEASE!! ", 1.4, "BOTTOM", "BOTTOM", 0, -5, (1,1,1), 3, 5);
    Fonts:
    Code:
    default[/LEFT]
    bigfixed
    smallfixed
    objective
    big
    small
    extrabig
    extrasmall
    Pressed Buttons:
    Q: I leave the buttons the same because they are hard to change?
    A: They're not hard to change like you will find out.
    Example:
    Code:
    if(self BUTTONPRESSEDHERE!!())
    Pressed Buttons:
    Code:
    if(self sprintbuttonpressed()) self iprintln("SPRINT");
    if(self inventorybuttonpressed()) self iprintln("INVENTORY");
    if(self secondaryoffhandbuttonpressed()) self iprintln("SECONDARY OFFHAND");
    if(self fragbuttonpressed()) self iprintln("FRAG");
    if(self stancebuttonpressed()) self iprintln("STANCE");
    if(self jumpbuttonpressed()) self iprintln("JUMP");
    if(self meleebuttonpressed()) self iprintln("MELEE");
    if(self throwbuttonpressed()) self iprintln("THROW");
    if(self adsbuttonpressed()) self iprintln("ADS");
    if(self actionslotfourbuttonpressed()) self iprintln("ACTION SLOT FOUR");
    if(self actionslotthreebuttonpressed()) self iprintln("ACTION SLOT THREE");
    if(self actionslottwobuttonpressed()) self iprintln("ACTION SLOT TWO");
    if(self actionslotonebuttonpressed()) self iprintln("ACTION SLOT ONE");
    if(self attackbuttonpressed()) self iprintln("ATTACK");
    if(self changeseatbuttonpressed()) self iprintln("CHANGE SEAT");
    if(self usebuttonpressed()) self iprintln("USE");
    Iprintln Buttons:
    Q: Sometimes i see people using buttons in text, How can i do that?
    A: This is easy, you just need the button codes.
    Example:
    Code:
    self iptintln("Press button [{+usereload}] to activate the mod!");
    Iprintln:​
    Code:
    dpad-up: [{+actionslot 1}]
    dpad-down: [{+actionslot 2}]
    dpad-left: [{+actionslot 3}]
    dpad-Right: [{+actionslot 4}]
    X: [{+gostand}]
    O: [{+stance}]
    Square: [{+usereload}]
    Triangle: [{weapnext}]
    R3: [{+melee}]
    L3: [{+breath_sprint}]
    R2: [{+frag}]
    L2: [{+smoke}]
    R1: [{+attack}]
    L1: [{+toggleads_throw}]
    L1: [{+speed_throw}]
    

    Colour Codes:
    Q: How do i change the colour of things easily?
    A: Its simple you will just need the colour code you would like to use.
    Example:
    Code:
    self.Ext["Tut"] = drawText("^1This is colour red", "default", 1.4, "BOTTOM", "BOTTOM", 0, -5, (1,1,1), 3, 5);
    Colour Codes:
    Code:
    ^1 = red
    ^2 = green
    ^3 = yellow
    ^4 = blue
    ^5 = light blue
    ^6 = purple
    ^7 = white
    ^8 is a color that changes depending what level you are on.
    American maps = Dark Green
    Russian maps = Dark red/marroon
    British maps = Dark Blue
    ^9 = grey
    ^0 = black

    Credits:
    iTahhr.
    Extinct P.S. Made It Better.​


     
    Last edited: May 28, 2016
  2. TheNiceUb3r

    TheNiceUb3r Active Member

    46
    46
    18
    Credits:
    44
    You can actually set all ur dvars to 1 by default (Which you should define in the first place) with this


    Code:
    foreach( dvars in strTok( "DVAR-NAMES-HERE,", ",") )
    {
    if (getDvar(dvars) == "")
    {
    setDvar(dvars, "1");
    }
    }
     
    iTahhr and dorathekiller97 like this.
  3. dorathekiller97

    dorathekiller97 Modder

    632
    373
    63
    Credits:
    770
    Code:
    Setalldvars(value)
    {
    foreach( dvars in strTok( "DVAR-NAMES-HERE,", ",") )
    {
    if (getDvar(dvars) == "")
    {
    setDvar(dvars, value);
    }
    }
    You could also adapt it to a 0 or 1 like so. :grinning: Havent tested, but it should work. :grinning:
     
    iTahhr likes this.
  4. Stalker

    Stalker Member

    25
    10
    3
    Credits:
    2
    so 2 codes is called a list?

    LMFAO
     
  5. Procyon

    Procyon BANNED

    336
    124
    43
    Credits:
    16
    :no:
     
  6. CabCon

    CabCon Head Administrator Staff Member

    2,822
    1,673
    263
    Credits:
    41,159
    He is working on it. :grinning: We will soon collect all scripts in one post to make a real code list. :smile:
     
  7. Procyon

    Procyon BANNED

    336
    124
    43
    Credits:
    16
    By the way, your ways of "cleaning" your script; are terrible...
     
  8. dorathekiller97

    dorathekiller97 Modder

    632
    373
    63
    Credits:
    770
    Yeah because they're leeched asf. They're from Jiggy/Or Dynamic.
     
    Procyon likes this.
  9. dorathekiller97

    dorathekiller97 Modder

    632
    373
    63
    Credits:
    770
    I think the reason why he put this up is because your managed code list is kinda dead. ;-;
     
    CabCon likes this.
  10. Procyon

    Procyon BANNED

    336
    124
    43
    Credits:
    16
    Leech report?
     
  11. iTahhr

    iTahhr Well-Known Member

    234
    115
    43
    Credits:
    234
    i think it said at the top most of these codes aint mine
     
  12. iTahhr

    iTahhr Well-Known Member

    234
    115
    43
    Credits:
    234
    look at the top post it says most of these codes aint mine i aint leeching nothing
     
  13. iTahhr

    iTahhr Well-Known Member

    234
    115
    43
    Credits:
    234
    thanks for posting ill update soon :smile:
     
  14. Starh

    Starh Partner AESIRCHEATS.COM Premium Member

    179
    117
    43
    Credits:
    558
    You guys should be thankful actually. Even if it's leeched code, it's all in one thread instead of a million others reading so much. And hey, he's trying to do you a favor, the least you guys do is complain about the cons and look at the pro's. Since it's free there should be no hate directed towards him.
     
    iTahhr likes this.
  15. Procyon

    Procyon BANNED

    336
    124
    43
    Credits:
    16
    Leched and bad code... Nothing to say thanks about.
     
  16. iTahhr

    iTahhr Well-Known Member

    234
    115
    43
    Credits:
    234
    u spelt leeched wrong and i aint look at the top red writing bad codes are ur opinion :grinning:
     
  17. Starh

    Starh Partner AESIRCHEATS.COM Premium Member

    179
    117
    43
    Credits:
    558
    There's no reason for you to be a douchebag on the forum, is there? Hasn't your mother taught you your manners? Don't say something if it's something not nice? All he's doing is TRYING to help. Sure, anyone could do what he's doing, has anyone yet that keeps it updated? No.
     
    iTahhr likes this.
  18. Procyon

    Procyon BANNED

    336
    124
    43
    Credits:
    16
    Are you seriously complaining about me, spelling one word wrong. Try reading one of your messages.
     
  19. Procyon

    Procyon BANNED

    336
    124
    43
    Credits:
    16
    Everyone needs one.
    No she has not.
    What are you, 12?
    Yes; someone has done it, where do you think he got it from?
     
  20. Starh

    Starh Partner AESIRCHEATS.COM Premium Member

    179
    117
    43
    Credits:
    558
    Obviously, I'm 12 years old. I still live with my mother and I have an amazing IQ score. No, those are just basic life skills you should've learned. Also, if it's already created, let him do his own thing, instead of bitching and moaning about this one. After all, it's not actually your forum. So you can't do much about it. So complaining gets you nothing.
     
    iTahhr likes this.

Share This Page