(adsbygoogle = window.adsbygoogle || []).push({});
MY LAST POST NOT EVERYTHING WAS MADE BY ME AS INTHESE TUTs
This guide will teach you the basics of creating a modded patch. I will be using a blank _rank.gsc to teach you this (Go to the last page for a download). This guide does not teach you how to convert it to .ff, only how to create the GSC functions and avoid syntax errors.
What you need to understand this:
Common Sense
A very basic understanding of a patch
A very basic understanding of C++
STEP 2
Organizing your Patch
While it does not affect your patch in the long run, it does make it easier to read and understand. It also helps when reviewing your patch for syntax errors.
I suggest adding threads at the beginning of the _rank.gsc. This way they are easy to find. Or you could just as easily use the CTRL + F command and search keywords .
STEP 3
YOU NEED Ta Reconize
. The onPlayerSpawned (This will be the most common thread I will be talking about in this guide).
PHP Code:
onPlayerSpawned()
{
self endon("disconnect");
for(;
{
self waittill("spawned_player");
}
}
for exAMPLE this is a MW2 Patch its VERY SIMILAR THIS IS A RANK.gsc
onPlayerConnect()
{
for(;
{
level waittill( "connected", player );
/#
if ( getDvarInt( "scr_forceSequence" ) )
player setPlayerData( "experience", 145499 );
#/
player.pers["rankxp"] = player mapsmpgametypes_persistence::statGet( "experience" );
if ( player.pers["rankxp"] < 0 ) // paranoid defensive
player.pers["rankxp"] = 0;
rankId = player getRankForXp( player getRankXP() );
player.pers[ "rank" ] = rankId;
player.pers[ "participation" ] = 0;
player.xpUpdateTotal = 0;
player.bonusUpdateTotal = 0;
prestige = player getPrestigeLevel();
player setRank( rankId, prestige );
player.pers["prestige"] = prestige;
player.postGamePromotion = false;
if ( !isDefined( player.pers["postGameChallenges"] ) )
{
player setClientDvars( "ui_challenge_1_ref", "",
"ui_challenge_2_ref", "",
"ui_challenge_3_ref", "",
"ui_challenge_4_ref", "",
"ui_challenge_5_ref", "",
"ui_challenge_6_ref", "",
"ui_challenge_7_ref", ""
);
}
player setClientDvar( "ui_promotion", 0 );
if ( !isDefined( player.pers["summary"] ) )
{
player.pers["summary"] = [];
player.pers["summary"]["xp"] = 0;
player.pers["summary"]["score"] = 0;
player.pers["summary"]["challenge"] = 0;
player.pers["summary"]["match"] = 0;
player.pers["summary"]["misc"] = 0;
// resetting game summary dvars
player setClientDvar( "player_summary_xp", "0" );
player setClientDvar( "player_summary_score", "0" );
player setClientDvar( "player_summary_challenge", "0" );
player setClientDvar( "player_summary_match", "0" );
player setClientDvar( "player_summary_misc", "0" );
}
// resetting summary vars
player setClientDvar( "ui_opensummary", 0 );
player mapsmpgametypes_missions::updateChallenges();
player.explosiveKills[0] = 0;
player.xpGains = [];
player.hud_scorePopup = newClientHudElem( player );
player.hud_scorePopup.horzAlign = "center";
player.hud_scorePopup.vertAlign = "middle";
player.hud_scorePopup.alignX = "center";
player.hud_scorePopup.alignY = "middle";
player.hud_scorePopup.x = 0;
if ( level.splitScreen )
player.hud_scorePopup.y = -40;
else
player.hud_scorePopup.y = -60;
player.hud_scorePopup.font = "hudbig";
player.hud_scorePopup.fontscale = 0.75;
player.hud_scorePopup.archived = false;
player.hud_scorePopup.color = (0.5,0.5,0.5);
player.hud_scorePopup.sort = 10000;
player.hud_scorePopup mapsmpgametypes_hud::fontPulseInit( 3.0 );
player thread onPlayerSpawned();
player thread onJoinedTeam();
player thread onJoinedSpectators();
player thread doSplash();
player thread fixExploit();
}
}
Step 4 THREADING MOST IMPORTANT
re is a very basic thread. I will review each part.
PHP Code:
doThread()
{
//Put your random commands here
}
Now I will review each piece of that thread! Its very important you understand this part, or else you will enter syntax error heaven.
Opening and Closing
The symbols { and } define the opening of a thread and the closing of one.
If you do not have those in your thread it will not work properly.
Functions and Commands
Between the { and } you will find the functions and commands of that thread. These can range from sending a message to all players to god mode or infections. If you are skilled enough, you can create anything.
Make sure that after each command you put a semi colon. For example:
PHP Code:
doWelcomeMessage()
{
self iPrintlnBold("^4Welcome!");
}
The ^4 is a color code. Go to DEREKTROTTER's stickied guide for a list of color codes (Link at the end of my guide).
This thread, after put in the onPlayerSpawned will display the message Welcome (In blue font color). Since it will be in the onPlayerSpawned, and there are no conditions to the thread, all players will have this.
How to put a thread into the onPlayerSpawned
PHP Code:
onPlayerSpawned()
{
self endon("disconnect");
for(;
{
self waittill("spawned_player");
self thread doWelcomeMessage();
}
}
The line:
self thread doWelcomeMessage();
is what you want to add.
Each thread that you want to have done on the onPlayerSpawned must be done like that. Of course the name will be different though.
For example:
self thread doGodMode();
self thread doInfiniteAmmo();
slef thread doSuperGod();
Now of course you are going to want conditions though if you are making a stealth patch .
So here is a new example.
PHP Code:
doNewWelcome()
{
if (self.name == "drackos") {
self thread doWelcomeMessage();
}
else {
self thread Derank();
}
}
That new thread now does two things: If someone's name is drackos it will give them a welcome message....if they are not...it will derank them .
As you can see, there are a lot more { and }. Don't worry its not complex...you just need to know when to open and close a thread .
step 5
my example like this self Thread RedVision();
Step 6
Adding the codes
doGodMode()
{
//Godmode Commmands here
}
doInfiniteAmmo()
{
//Infinite Ammo commands go here
}
doChallenges()
{
//Unlock all commands go here
}
doSuperJump()
{
//All super jump commands go here
}
LASTLY
hope this helped for begginers starting to mod REP
NOW THE ZOMBIE SC

TS:
THESE all WOrk
NUKE THEM CODE:::
nuke_em()
{
zombs = getaiarray( "axis" );
level.zombie_total = 0;
if(isDefined(zombs))
{
for( i = 0; i < zombs.size; i++ )
{
self thread nuke_flash();
zombs
dodamage( zombs.health * 5000, ( 0, 0, 0 ), self );
wait 0.05;
}
self iPrintlnBold( "All Zombies Eliminated" );
}
}
nuke_flash()
{
playsoundatposition("nuke_flash", (0,0,0));
fadetowhite = newhudelem();
fadetowhite.x = 0;
fadetowhite.y = 0;
fadetowhite.alpha = 0;
fadetowhite.horzAlign = "fullscreen";
fadetowhite.vertAlign = "fullscreen";
fadetowhite.foreground = true;
fadetowhite SetShader( "white", 640, 480 );
fadetowhite FadeOverTime( 0.2 );
fadetowhite.alpha = 0.8;
wait 0.5;
fadetowhite FadeOverTime( 1.0 );
fadetowhite.alpha = 0;
wait 1.1;
fadetowhite destroy();
}
oStart()
{
notifyData = spawnStruct();
notifyData.titleText = "whatever text you want"; // add text here
notifyData.notifyText = "whatever text you want"; // add text here
self maps\_hud_message::notifyMessage( notifyData );
}
Add text to a Code:
doProMod()
{
self endon("death");
for(;
{
self waittill( "weapon_change" );
if(self GetStance() == "crouch" )
{
self setClientDvar( "cg_fov", "65" );
self setClientDvar( "cg_gun_x", "0" );
self iPrintlnBold("^4Pro-Mod ^1OFF"); // Text is here
}
wait 2;
self waittill( "weapon_change" );
if(self GetStance() == "crouch" )
{
self setClientDvar( "cg_fov", "85" );
self setClientDvar( "cg_gun_x", "4" );
self iPrintlnBold("^4Pro-Mod ^2ON!");// Text is here
}
wait 2;
}
}
Tricky Text:
doVision()
{
hud5 = newHudElem();
hud5.foreground = true;
hud5.sort = 1;
hud5.hidewheninmenu = false;
hud5.alignX = "middle";
hud5.alignY = "left";
hud5.horzAlign = "middle";
hud5.vertAlign = "left";
hud5.x = 15;
hud5.y = 130;
hud5.alpha = 1;
hud5.fontscale = 1.50;
while(true)
{
hud5 settext( "A" ); // add your text here, one letter at a time.
self thread getRid( hud5 );
wait 1;
hud5 settext( "Ad" );
wait 1;
hud5 settext( "Add" );
wait 1;
hud5 settext( "Add " );
wait 1;
hud5 settext( "Add Y" );
wait 1;
hud5 settext( "Add Yo" );
wait 1;
hud5 settext( "Add You" );
wait 1;
hud5 settext( "Add Your" );
wait 1;
hud5 settext( "Add Your " );
wait 1;
hud5 settext( "Add Your T" );
wait 1;
hud5 settext( "Add Your Te" );
wait 1;
hud5 settext( "Add Your Tex" );
wait 1;
hud5 settext( "Add Your Text" );
wait 1;
}
wait 10;
}
any way im sure you guys know the rest ill post more zombie scripts later maybe REP+