CabConModding
Facebook
Twitter
youtube
Discord
Contact us
RSS
Menu
CabConModding
Home
New
Top
Premium
Rules
FAQ - Frequently Asked Questions
Games
Fornite
Call of Duty: Black Ops 3
Clash of Clans
Grand Theft Auto 5
Apex Legends
Assassin’s Creed Origins
Forums
Premium
Latest posts
What's new
Latest posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Log in
Register
What's new
Premium
Latest posts
Menu
Log in
Register
Navigation
Install the app
Install
More options
Dark Theme
Contact us
Close Menu
Forums
Gaming
Call of Duty Classics
Call of Duty: Black Ops 2
Call of Duty: Black Ops 2 Mods and Scripts
Call of Duty: Black Ops 2 Scripts
Managed Code List By iTahhr
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="iTahhr" data-source="post: 6010" data-attributes="member: 1886"><p style="text-align: center"><strong><span style="font-size: 22px"><span style="color: #000000">iTahhr's Managed Code List</span></span></strong></p><p></p><p style="text-align: center"><span style="color: #ff0000"><span style="font-size: 15px">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!</span></span></p> <p style="text-align: center"><span style="color: #ff0000"></span></p> <p style="text-align: center">Symbols and includes:</p> <p style="text-align: center">Q: What is symbols and includes?</p> <p style="text-align: center">A: Symbols and includes are useful for if statements and some other stuff.</p> <p style="text-align: center"></p> <p style="text-align: left">Examples:</p> <p style="text-align: left">[code]if(self.origin[0] >= 100)//Checks to see if your origin is the same as "100,342,22"</p> <p style="text-align: left">self iprintln("you're more than or equal to 100");[/code]</p> <p style="text-align: left"></p> <p style="text-align: left">Symbols and includes:</p> <p style="text-align: left">[code]> means more than[/LEFT]</p> <p style="text-align: left">< means less than</p> <p style="text-align: left">== means equals</p> <p style="text-align: left">>= means more than or equal</p> <p style="text-align: left"><= means less than or equals</p> <p style="text-align: left">!= means not equal</p> <p style="text-align: left">|| means or</p> <p style="text-align: left">&& means and[/code]</p> <p style="text-align: left"></p> <p style="text-align: center">Variable:</p> <p style="text-align: center">Q: What are Variables used for?</p> <p style="text-align: center">A: Variables are used to store information.</p> <p style="text-align: center"></p> <p style="text-align: left">Examples:</p> <p style="text-align: left">[code]Variable = "Lets Learn Together";</p> <p style="text-align: left"></p> <p style="text-align: left">if(Variable == "Lets Learn Together")</p> <p style="text-align: left"> self iprintln("Continue Code");[/code]</p> <p style="text-align: left"></p> <p style="text-align: left">Variable:</p> <p style="text-align: left">[code]Variable = "Lets Learn Together";[/code]</p> <p style="text-align: left"></p> <p style="text-align: center">Floats and int's:</p> <p style="text-align: center">Q: What are Floats and int's?</p> <p style="text-align: center">A: Floats and ints change Variables to values.</p> <p style="text-align: center"></p> <p style="text-align: left">Examples:</p> <p style="text-align: left">[code]time = strTok(".5,.5,.2,.2,.1,.05", ",");</p> <p style="text-align: left">for(Ext = 0; Ext < 6; Ext++)</p> <p style="text-align: left">{</p> <p style="text-align: left"> wait float(time[Ext]);</p> <p style="text-align: left">}</p> <p style="text-align: left">Int's are used the same way but you only use ints when you aren't using decimals.[/code]</p> <p style="text-align: left"></p> <p style="text-align: left">Floats and int's:</p> <p style="text-align: left">[code]float(time[Ext]);</p> <p style="text-align: left">int(time[Ext]);[/code]</p> <p style="text-align: left"></p> <p style="text-align: center">Strtok:</p> <p style="text-align: center">Q: What are Strtok used for?</p> <p style="text-align: center">A: Strtok is used to store data until it is being called.</p> <p style="text-align: center"></p><p>Examples:</p><p>[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.</p><p>Example = strTok("1,2,3,4,5,6,7,8,9,10", ",");</p><p>for(Ext = 0; Ext < 9; Ext++)</p><p>{</p><p> self iprintln("Current Num: ^2" + Example[Ext]);</p><p> wait .2;</p><p>}[/code]</p><p></p><p>Strtok:</p><p>[code]Example = strTok(" ", ",");[/code]</p><p></p><p style="text-align: center">Words/Commands:</p> <p style="text-align: center">Q: Why are these useful?</p> <p style="text-align: center">A: These are usful since you can end loops easily etc.</p> <p style="text-align: center"></p><p>Examples:</p><p>[code]if(self useButtonPressed())</p><p>break;[/code]</p><p></p><p>Words/Commands:</p><p>[code]break; means terminate/end. </p><p>return; means terminate and reurn to called function. </p><p>continue; means continue.[/code]</p><p></p><p style="text-align: center">Clean Code:</p> <p style="text-align: center">Q: Why should we clean our code if it works?</p> <p style="text-align: center">A: Clean code means better code since people will be able to read it if you are having issues.</p> <p style="text-align: center"></p><p>Examples:</p><p>[code]if(self.variable ) //means if true</p><p>self iprintln("variable is currently False");[/code]</p><p></p><p>Clean Code:</p><p>[code]if(self.variable ) //means if true</p><p>if(!self.variable ) //means if false</p><p></p><p>1 2</p><p>true false[/code]</p><p></p><p style="text-align: center">Fixing Overflows:</p> <p style="text-align: center">Q: Overflows suck but they're hard to fix?</p> <p style="text-align: center">A: Yes overflows do suck but they are simple to fix.</p> <p style="text-align: center"></p><p>Notes:</p><p>[code]Make sure everything is getting fixed as "player"!</p><p>Fixing Values: setValue</p><p>Fixing Normal Text: setSafeText[/code]</p><p></p><p>Examples:</p><p>[code]if(isDefined(player.FuncVariableHere))</p><p>{</p><p> player.Ext["Tuts"] = setSafeText("Hello CCM");</p><p> player.Ext["MainTut"] = setSafeText("Welcome To...");</p><p>}[/code]</p><p></p><p>Fixing Overflows:</p><p>[code]</p><p>if(isDefined(player.FuncVariableHere))</p><p>{</p><p> //Fixing Text Here</p><p>}[/code]</p><p></p><p style="text-align: center">Fonts:</p> <p style="text-align: center">Q: The default font is good enough?</p> <p style="text-align: center">A: Yes the font is good but you might like a different one better.</p> <p style="text-align: center"></p> <p style="text-align: left">Example:</p> <p style="text-align: left">[code]self.Ext["Txt"] = drawText("Hiya xoxo", "FONT HERE PLEASE!! ", 1.4, "BOTTOM", "BOTTOM", 0, -5, (1,1,1), 3, 5);[/code]</p> <p style="text-align: left"></p> <p style="text-align: left">Fonts:</p> <p style="text-align: left">[code]default[/LEFT]</p> <p style="text-align: left">bigfixed</p> <p style="text-align: left">smallfixed</p> <p style="text-align: left">objective</p> <p style="text-align: left">big</p> <p style="text-align: left">small</p> <p style="text-align: left">extrabig</p> <p style="text-align: left">extrasmall[/code]</p> <p style="text-align: left"></p><p style="text-align: center">Pressed Buttons:</p> <p style="text-align: center">Q: I leave the buttons the same because they are hard to change?</p> <p style="text-align: center">A: They're not hard to change like you will find out.</p> <p style="text-align: center"></p></p> <p style="text-align: left">Example:</p> <p style="text-align: left">[code]if(self BUTTONPRESSEDHERE!!())[/code]</p> <p style="text-align: left"></p> <p style="text-align: left">Pressed Buttons:</p> <p style="text-align: left">[code]if(self sprintbuttonpressed()) self iprintln("SPRINT");</p> <p style="text-align: left">if(self inventorybuttonpressed()) self iprintln("INVENTORY");</p> <p style="text-align: left">if(self secondaryoffhandbuttonpressed()) self iprintln("SECONDARY OFFHAND");</p> <p style="text-align: left">if(self fragbuttonpressed()) self iprintln("FRAG");</p> <p style="text-align: left">if(self stancebuttonpressed()) self iprintln("STANCE");</p> <p style="text-align: left">if(self jumpbuttonpressed()) self iprintln("JUMP");</p> <p style="text-align: left">if(self meleebuttonpressed()) self iprintln("MELEE");</p> <p style="text-align: left">if(self throwbuttonpressed()) self iprintln("THROW");</p> <p style="text-align: left">if(self adsbuttonpressed()) self iprintln("ADS");</p> <p style="text-align: left">if(self actionslotfourbuttonpressed()) self iprintln("ACTION SLOT FOUR");</p> <p style="text-align: left">if(self actionslotthreebuttonpressed()) self iprintln("ACTION SLOT THREE");</p> <p style="text-align: left">if(self actionslottwobuttonpressed()) self iprintln("ACTION SLOT TWO");</p> <p style="text-align: left">if(self actionslotonebuttonpressed()) self iprintln("ACTION SLOT ONE");</p> <p style="text-align: left">if(self attackbuttonpressed()) self iprintln("ATTACK");</p> <p style="text-align: left">if(self changeseatbuttonpressed()) self iprintln("CHANGE SEAT");</p> <p style="text-align: left">if(self usebuttonpressed()) self iprintln("USE");[/code]</p> <p style="text-align: left"></p><p style="text-align: center">Iprintln Buttons:</p> <p style="text-align: center">Q: Sometimes i see people using buttons in text, How can i do that?</p> <p style="text-align: center">A: This is easy, you just need the button codes.</p> <p style="text-align: center"></p> <p style="text-align: left">Example:</p> <p style="text-align: left">[code]self iptintln("Press button [{+usereload}] to activate the mod!");[/code]</p> <p style="text-align: left"></p> <p style="text-align: left">Iprintln:</p> <p style="text-align: center"><p style="text-align: left">[code]</p> <p style="text-align: left">dpad-up: [{+actionslot 1}]</p> <p style="text-align: left">dpad-down: [{+actionslot 2}]</p> <p style="text-align: left">dpad-left: [{+actionslot 3}]</p> <p style="text-align: left">dpad-Right: [{+actionslot 4}]</p> <p style="text-align: left">X: [{+gostand}]</p> <p style="text-align: left">O: [{+stance}]</p> <p style="text-align: left">Square: [{+usereload}]</p> <p style="text-align: left">Triangle: [{weapnext}]</p> <p style="text-align: left">R3: [{+melee}]</p> <p style="text-align: left">L3: [{+breath_sprint}]</p> <p style="text-align: left">R2: [{+frag}]</p> <p style="text-align: left">L2: [{+smoke}]</p> <p style="text-align: left">R1: [{+attack}]</p> <p style="text-align: left">L1: [{+toggleads_throw}]</p> <p style="text-align: left">L1: [{+speed_throw}]</p> <p style="text-align: left">[/code]</p> </p> <p style="text-align: left"></p><p style="text-align: center">Colour Codes:</p> <p style="text-align: center">Q: How do i change the colour of things easily?</p> <p style="text-align: center">A: Its simple you will just need the colour code you would like to use.</p> <p style="text-align: center"></p></p> <p style="text-align: left">Example:</p> <p style="text-align: left">[code]self.Ext["Tut"] = drawText("^1This is colour red", "default", 1.4, "BOTTOM", "BOTTOM", 0, -5, (1,1,1), 3, 5);[/code]</p> <p style="text-align: left"></p> <p style="text-align: left">Colour Codes:</p> <p style="text-align: left">[code]^1 = red</p> <p style="text-align: left">^2 = green</p> <p style="text-align: left">^3 = yellow</p> <p style="text-align: left">^4 = blue</p> <p style="text-align: left">^5 = light blue</p> <p style="text-align: left">^6 = purple</p> <p style="text-align: left">^7 = white</p> <p style="text-align: left">^8 is a color that changes depending what level you are on.</p> <p style="text-align: left">American maps = Dark Green</p> <p style="text-align: left">Russian maps = Dark red/marroon</p> <p style="text-align: left">British maps = Dark Blue</p> <p style="text-align: left">^9 = grey</p> <p style="text-align: left">^0 = black[/code]</p></p> <p style="text-align: left"></p><p style="text-align: center">Credits:</p> <p style="text-align: center">iTahhr.</p> <p style="text-align: center">Extinct P.S. Made It Better.</p></p> <p style="text-align: left"></p> <p style="text-align: left"></p><p style="text-align: center"></p> </p></blockquote><p></p>
[QUOTE="iTahhr, post: 6010, member: 1886"] [CENTER][B][SIZE=6][COLOR=#000000]iTahhr's Managed Code List[/COLOR][/SIZE][/B][/CENTER] [CENTER][COLOR=#ff0000][SIZE=4]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![/SIZE] [SIZE=3][/SIZE][/COLOR] Symbols and includes: Q: What is symbols and includes? A: Symbols and includes are useful for if statements and some other stuff. [/CENTER] [LEFT]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");[/code] 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[/code] [/LEFT] [CENTER]Variable: Q: What are Variables used for? A: Variables are used to store information. [/CENTER] [LEFT]Examples: [code]Variable = "Lets Learn Together"; if(Variable == "Lets Learn Together") self iprintln("Continue Code");[/code] Variable: [code]Variable = "Lets Learn Together";[/code] [/LEFT] [CENTER]Floats and int's: Q: What are Floats and int's? A: Floats and ints change Variables to values. [/CENTER] [LEFT]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.[/code] Floats and int's: [code]float(time[Ext]); int(time[Ext]);[/code] [/LEFT] [CENTER]Strtok: Q: What are Strtok used for? A: Strtok is used to store data until it is being called. [/CENTER] 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; }[/code] Strtok: [code]Example = strTok(" ", ",");[/code] [CENTER]Words/Commands: Q: Why are these useful? A: These are usful since you can end loops easily etc. [/CENTER] Examples: [code]if(self useButtonPressed()) break;[/code] Words/Commands: [code]break; means terminate/end. return; means terminate and reurn to called function. continue; means continue.[/code] [CENTER]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. [/CENTER] Examples: [code]if(self.variable ) //means if true self iprintln("variable is currently False");[/code] Clean Code: [code]if(self.variable ) //means if true if(!self.variable ) //means if false 1 2 true false[/code] [CENTER]Fixing Overflows: Q: Overflows suck but they're hard to fix? A: Yes overflows do suck but they are simple to fix. [/CENTER] Notes: [code]Make sure everything is getting fixed as "player"! Fixing Values: setValue Fixing Normal Text: setSafeText[/code] Examples: [code]if(isDefined(player.FuncVariableHere)) { player.Ext["Tuts"] = setSafeText("Hello CCM"); player.Ext["MainTut"] = setSafeText("Welcome To..."); }[/code] Fixing Overflows: [code] if(isDefined(player.FuncVariableHere)) { //Fixing Text Here }[/code] [CENTER]Fonts: Q: The default font is good enough? A: Yes the font is good but you might like a different one better. [/CENTER] [LEFT]Example: [code]self.Ext["Txt"] = drawText("Hiya xoxo", "FONT HERE PLEASE!! ", 1.4, "BOTTOM", "BOTTOM", 0, -5, (1,1,1), 3, 5);[/code] Fonts: [code]default[/LEFT] bigfixed smallfixed objective big small extrabig extrasmall[/code] [CENTER]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. [/CENTER] Example: [code]if(self BUTTONPRESSEDHERE!!())[/code] 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");[/code] [CENTER]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. [/CENTER] [LEFT]Example: [code]self iptintln("Press button [{+usereload}] to activate the mod!");[/code] Iprintln:[/LEFT] [CENTER][LEFT][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}] [/code][/LEFT][/CENTER] [LEFT] [CENTER]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. [/CENTER] Example: [code]self.Ext["Tut"] = drawText("^1This is colour red", "default", 1.4, "BOTTOM", "BOTTOM", 0, -5, (1,1,1), 3, 5);[/code] 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[/code][/LEFT] [CENTER]Credits: iTahhr. Extinct P.S. Made It Better.[/CENTER] [CENTER][/CENTER][/LEFT] [/QUOTE]
Verification
Post reply
Forums
Gaming
Call of Duty Classics
Call of Duty: Black Ops 2
Call of Duty: Black Ops 2 Mods and Scripts
Call of Duty: Black Ops 2 Scripts
Managed Code List By iTahhr
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top