GSC Managed Code List By iTahhr

Procyon

BANNED
Messages
325
Reaction score
119
Points
43
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.
No.
 

iTahhr

Well-Known Member
Messages
248
Reaction score
119
Points
243
Everyone needs one.

No she has not.

What are you, 12?

Yes; someone has done it, where do you think he got it from?
ill just take this as advice that i should update the code but please there is no need to argue with other members if u have any ideas you can post and the reason I'm making this is because people never update there's and if they do they will make a new thread on it
 

The Dark Side

Former Staff Member
Messages
1,007
Reaction score
784
Points
993
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.
Im not hating. Its just that changing "Setdvar" to "H" and "Precachemodel" to "PM" doesnt really clean anything.
 

iTahhr

Well-Known Member
Messages
248
Reaction score
119
Points
243
Sure, You can also clean up the code for precaching your models as such

Code:
foreach( shades in strTok( ", ",") )
    precacheShader( shades );

Same with models

Code:
foreach( model in strTok( ", ",") )
    precachemodel( model );
Thanks ill be sure to add :grinning:
 

iTahhr

Well-Known Member
Messages
248
Reaction score
119
Points
243
Edited Thread.
P.S. I got bored so I stopped working on the thread but if you guys want to see more added type @[nobody@CCM:] in the comments :grinning: @Procyon
 

Procyon

BANNED
Messages
325
Reaction score
119
Points
43
Trust me it isnt.
700a589cee862076ef77ae276ce2d9b7.png

Nuff said...
 

The Dark Side

Former Staff Member
Messages
1,007
Reaction score
784
Points
993
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.​

This thread looks so much better than when it first came up. Good work. :smile:
 

The Dark Side

Former Staff Member
Messages
1,007
Reaction score
784
Points
993
Sure, You can also clean up the code for precaching your models as such

Code:
foreach( shades in strTok( ", ",") )
    precacheShader( shades );

Same with models

Code:
foreach( model in strTok( ", ",") )
    precachemodel( model );
Damn. I would've said that if my internet hadn't went out, i swear xD
 
Top