Page 1 of 3 123 LastLast
Results 1 to 15 of 42
  1. #1
    Josephlittle™'s Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    GSC Modding Section
    Posts
    1,345
    Reputation
    26
    Thanks
    562
    My Mood
    Devilish

    [Tutorial] Gsc For Dummies

    Hello everyone, this is a Tutorial for .gsc modding. This tutorial is for people who have NO idea how to mod, and want to learn themselves . Anyways, in this tutorial we will learn:

    ☻.Gsc Files

    ☻ How a .Gsc works

    ☻ How to call in commands and threads on _rank.gsc

    ☻ .Gsc Commands

    ☻ "Advanced" Code

    First of all, if you do not know how to run a mod, this isn't a tutorial for you. This tutorial is for people who already have experience in hosting a mod, but really want to do a mod themselves. This tutorial is also for educational purposes only, Josephlittle is not responsible for any bans or something bad happening to your game. Sources where information has been gathered:
    .gsc Codes
    Private Server Section
    Discussion section

    Anyways, lets get back to the tutorial shall we :D?

    .Gsc Files:

    As probably many of you know, you can run a mod as a .gsc file. But those .gsc files are all part of .ff files, think of it as a giant folder with loads of papers, the folder is the .ff files. Also, modders usually use _rank.gsc because it contains the OnPlayerSpawned thread (we will go over this later) and also deals with player Connect, which is kind of important.

    Anyways, there are many .gsc files you can use out there, and every single one has a function to make the game work. We, modders, just modify them to suit our needs :)


    How a .Gsc file works:

    There are 2 ways of loading a .gsc file. One is saving the patch_mp.ff with your .gsc files (which is the most horrible thing you can do, probably causing you to be banned) and there is injecting. Of course, both probably get you banned, but this is only a tutorial for people who are willing to take the risk (aIW doesnt ban people who host mods as lots of you know)

    anyways, a .gsc file always has somewhat of a loop function. For example, in _rank.gsc there is a command that waits untill you spawn, and does another command. That is also a "loop". We will go over more information in the next Subject.


    How to call in commands and threads on _rank.gsc

    Let's go deeper in the _rank.gsc file. Open it and you will see lots of code. Don't worry, we will go over them later. Now, with your magical Control + F button(search), put in: OnPlayerSpawned

    you will see this code over here:
    Code:
    onPlayerSpawned()
    {
    	self endon("disconnect");
    
    	for(;;)
    	{
    		self waittill("spawned_player");
    	}
    }
    That whole "paragraph" (a.k.a a thread) is what makes the .gsc file works. Threads are very easily found by:

    The name of the thread followed by 2 parenthesis( eg.: onPlayerSpawned()
    then there are brackets for code. Brackets are important when you are going to start a code, without them you are pretty much screwed /baba.


    Note that this code here: self waittill("spawned_player");

    has a semi colon after the command(;;;;;;;). This semi colon is to end a command, and you need them after every "game" command (not a syntax code like For(;;) )

    We will modify that thread with the commands in the next Subject

    .Gsc Commands:

    See this thread by Abstract for .gsc codes: .gsc codes

    lets say i want to add a wallhack SO much. so what we do is we get the command from the huge list (might take a while to find it)

    and here, the command to activate the wallhack is:
    self ThermalVisionFOFOverlayOn();

    now you are probably wondering, what do I do with this? lets go back to our onplayerspawned() and find out:
    Code:
    onPlayerSpawned()
    {
    	self endon("disconnect");
    
    	for(;;)
    	{
    		self waittill("spawned_player");
                    self ThermalVisionFOFOverlayOn();
    	}
    }
    As you can see, I implemented the code after the player is spawned, so whenever I spawn I get wallhack.

    Anyways, lets say i want to add a weapon. the code to add a weapon is:
    self giveWeapon(<name of the weapon>, <camouflage>, <I think this is akimbo, but put 0 in here so you dont mess up your code> );

    Now lets say I want to add an ak-47 after I respawn. So, we fill in the blanks:

    self giveWeapon("ak47_mp", 0 , 0 );

    PS: Every weapon name you put in HAS to be between quotes, and also every weapon for multiplayer has _mp after the weapon name.

    so, we add that command to the onPlayerSpawned thread:

    Code:
    onPlayerSpawned()
    {
    	self endon("disconnect");
    
    	for(;;)
    	{
    		self waittill("spawned_player");
                    self ThermalVisionFOFOverlayOn();
                    self giveWeapon("ak47_mp", 0 , 0 );
    	}
    }
    There you go, you now have Wallhack and an ak-47!

    Next Subject we will cover up False, True codes and Loops


    "Advanced" Codes:

    After you've did some things to your code, you want to add a loop function so that the player never looses something. The loop code is:
    Code:
    while(1) {
    }
    This may sound very simple, and it is! this in english means:

    Code:
    While true(true is 1, false is 0), we do this code
    So, lets say I want to keep setting the ak-47 ammo to it's max capacity. So we add:

    Code:
    while(1) {
    			self GiveMaxAmmo("ak47_mp");
    }
    This will keep giving you unlimited ammo untill you die :D

    So lets add this in the onplayerspawned thread:
    Code:
    onPlayerSpawned()
    {
    	self endon("disconnect");
    
    	for(;;)
    	{
    		self waittill("spawned_player");
                    self ThermalVisionFOFOverlayOn();
                    self giveWeapon("ak47_mp", 0 , 0 );
                    while(1) {
    			self GiveMaxAmmo("ak47_mp");
                    }
    	}
    }

    And that's it, you just learned the BASIC of mods, good job!


    Stay tuned for part 2 that will probably come out next week

    Last edited by House; 09-14-2010 at 05:19 PM.

  2. The Following 24 Users Say Thank You to Josephlittle™ For This Useful Post:

    arabking (11-03-2010),Bencici (10-28-2010),Blackaiser (03-12-2011),cgallagher21 (11-03-2010),darkness17 (04-10-2011),davianROX (11-04-2010),edey (05-15-2011),felleman (10-24-2010),FORCE™ (09-14-2010),Ian Milliken (07-24-2012),iDreamz (09-14-2010),iKiLLYouCro (01-23-2011),JustAndy (05-07-2011),karnige15 (09-14-2010),Legend Of Hacking (10-03-2010),mattgame555 (10-23-2010),Michaelclaw (05-07-2013),Mirciulikkk (09-14-2010),Mr.Mackey (09-14-2010),myoldaccountissgtbighacks (09-17-2011),Snwo (10-31-2010),StewieGriffin (03-12-2011),Xephide (07-02-2011),{MW2U}StrikeZ (09-22-2010)

  3. #2
    Mr.Mackey's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Location
    ::1
    Posts
    296
    Reputation
    12
    Thanks
    268
    My Mood
    Twisted
    Nice I like your tut, good job
    /Thanked
    /Request Sticky
    I helped you out?
    Press the button

  4. The Following User Says Thank You to Mr.Mackey For This Useful Post:

    03maurice10 (09-14-2010)

  5. #3
    Josephlittle™'s Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    GSC Modding Section
    Posts
    1,345
    Reputation
    26
    Thanks
    562
    My Mood
    Devilish
    Quote Originally Posted by Mr.Mackey View Post
    Nice I like your tut, good job
    /Thanked
    /Request Sticky
    thanks... Actually this isnt really that advanced, i didnt even teach people how to make a thread

  6. #4
    AZUMIKKEL's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    My moms house... what's so funny about that?
    Posts
    790
    Reputation
    19
    Thanks
    462
    My Mood
    Sneaky
    While true(true is 1, false is 0), we do this code
    Would that mean 0.5 is 'sorta'?
    www.YouTube.com/MpKiller100

  7. The Following User Says Thank You to AZUMIKKEL For This Useful Post:

    tiuner89 (12-22-2012)

  8. #5
    Josephlittle™'s Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    GSC Modding Section
    Posts
    1,345
    Reputation
    26
    Thanks
    562
    My Mood
    Devilish
    Quote Originally Posted by AZUMIKKEL View Post
    Would that mean 0.5 is 'sorta'?
    0=false
    1= true

    lol xD?

  9. #6
    Mr.Mackey's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Location
    ::1
    Posts
    296
    Reputation
    12
    Thanks
    268
    My Mood
    Twisted
    Quote Originally Posted by Josephlittle™ View Post
    thanks... Actually this isnt really that advanced, i didnt even teach people how to make a thread
    Yes but its usefull for ppl who dont know this yet.
    Just like my How to make bunkers TUT.
    I already knew those stuff.
    I made 4 s and repeated what i said in previous threads xD.
    So its kinda useful to stick it so everyone can see it
    I helped you out?
    Press the button

  10. #7
    soccerguy's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Posts
    171
    Reputation
    10
    Thanks
    74
    I posted how to make bunkers first on this website. =(
    My Favorite Conversation Word For Word
    "Hey Geek Your So Retarded And Uncool!"
    "You May Think So Now But When I'm Making A Million Dollars A Year Doing This We'll See Who Actually Is Retarded"

    GO GEEKS!

  11. #8
    Josephlittle™'s Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    GSC Modding Section
    Posts
    1,345
    Reputation
    26
    Thanks
    562
    My Mood
    Devilish
    Quote Originally Posted by soccerguy View Post
    I posted how to make bunkers first on this website. =(
    lol, but your directions i had no idea how to follow them

  12. #9
    Mirciulikkk's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    39
    Reputation
    10
    Thanks
    2
    My Mood
    Hungover
    Nice one, mate. Thanks

  13. #10
    kerocx's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    79
    Reputation
    10
    Thanks
    6
    Soccerguy ur taking credits for what is already given in killings mod lol. All threads of the mapedit have the value meanings in (). The only thing that u did was write them again ^^

  14. #11
    Josephlittle™'s Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    GSC Modding Section
    Posts
    1,345
    Reputation
    26
    Thanks
    562
    My Mood
    Devilish
    Quote Originally Posted by kerocx View Post
    Soccerguy ur taking credits for what is already given in killings mod lol. All threads of the mapedit have the value meanings in (). The only thing that u did was write them again ^^
    could we please get on topic??


    check out my new avatar...matches my usertitle !

  15. #12
    rathynia's Avatar
    Join Date
    Mar 2009
    Gender
    male
    Location
    Modern Warfare 2 Section.
    Posts
    457
    Reputation
    126
    Thanks
    538
    My Mood
    Aggressive
    Quote Originally Posted by Josephlittle™ View Post
    0=false
    1= true

    lol xD?
    Let me correct you here 0 == false
    Anything that isn't 0 below or above is true.
    Nothing Is "Impossible" For The Word Itself Says "I'm Possible".
    If you get a thank from me you better act like it's a reward, because I don't give them out easily.

    Computer Specs:
    Processor - AMD Athlon(tm) II X4 640 Processor 3.0 GHz (Not OverClocked)
    RAM - 8.0 GB
    OS - Microsoft Windows 7 Ultimate Edition 64-bit
    Video Card - GeForce GTX 550 Ti
    Video RAM 4.0 GB
    Pixel Shader version 5.0
    Vertex Shader version 5.0
    Sound Card - NVIDIA High Definition Audio
    Disk space - 1,640 GB

  16. #13
    AZUMIKKEL's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    My moms house... what's so funny about that?
    Posts
    790
    Reputation
    19
    Thanks
    462
    My Mood
    Sneaky
    Quote Originally Posted by rathynia View Post
    Let me correct you here 0 == false
    Anything that isn't 0 below or above is true.
    /agree
    I were just joking with him. Right?
    www.YouTube.com/MpKiller100

  17. #14
    Insane's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    9,057
    Reputation
    1007
    Thanks
    2,013
    You dumbass
    You KNEW i was making this...

    PS: your color scheme sucks
    Last edited by Insane; 09-14-2010 at 04:46 PM.

    Ex Middleman

  18. #15
    Mr.Mackey's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Location
    ::1
    Posts
    296
    Reputation
    12
    Thanks
    268
    My Mood
    Twisted
    :O You stole insane's idea? :O BAN HIM!
    No joke. Theres just posted another tut xD.
    So post yours to compare which is best xD
    I helped you out?
    Press the button

Page 1 of 3 123 LastLast

Similar Threads

  1. [tutorial]gsc modding for beginners[tutorial]
    By griezel32 in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 16
    Last Post: 10-05-2010, 02:15 PM
  2. Hacks, come here for Tutorial, but for a price ;)
    By flytuff in forum Trade Accounts/Keys/Items
    Replies: 2
    Last Post: 01-13-2009, 04:52 AM
  3. Hacking for dummys?
    By one44 in forum Combat Arms Hacks & Cheats
    Replies: 15
    Last Post: 12-27-2008, 07:45 PM
  4. (TUTORIAL) ComboBox For Example TELEPORT
    By apezwijn in forum Visual Basic Programming
    Replies: 9
    Last Post: 06-26-2008, 02:22 AM
  5. [Tutorial]Wallhack for WarRock! Only here!
    By ziom2322 in forum WarRock - International Hacks
    Replies: 17
    Last Post: 06-25-2007, 03:56 PM