Normal
Hello everyone my name is Sheperdebops its been awhile since modded or even been here but just for abit of fun i decided to get in to it again.Here you will find scripts for both multiplayer and zombies im just creating the thread for the time being.Scripts can be submitted as well which is always helpful to others. GSC is dead yeah but its useful for those who are new to modding to understand the roots and also get a feel.General Controls and Scripts[SPOILER="Text"]Displays text in the middle[CODE=cpp]self iPrintlnBold("Hello");[/CODE]Top Left[CODE=cpp]self iPrintln("Hello");[/CODE]Create Permanent Text[CODE=cpp]Text = createfontstring("objective", 1.5);Text setPoint("CENTER", "CENTER", 0, 0);Text setText("Hello");[/CODE][/SPOILER][SPOILER="Draw Shaders"][CODE=cpp]createRectangle(align,relative,x,y,width,height,color,shader,sort,alpha) { barElemBG = newClientHudElem( self ); barElemBG.elemType = "menu_bio_russian"; if ( !level.splitScreen ) { barElemBG.x = -2; barElemBG.y = -2; } barElemBG.width = width; barElemBG.height = height; barElemBG.align = align; barElemBG.relative = relative; barElemBG.xOffset = 0; barElemBG.yOffset = 0; barElemBG.children = []; barElemBG.sort = sort; barElemBG.color = color; barElemBG.alpha = alpha; barElemBG setParent( level.uiParent ); barElemBG setShader( shader, width , height ); barElemBG.hidden = false; barElemBG setPoint(align,relative,x,y); return barElemBG; } [/CODE][/SPOILER][SPOILER="Colour Code for Text"]Text Colours (Mainly used for iPrintlnBold & iPrintln can be used on createfrontstring())[CODE=cpp]Green ^1Red/Orange ^2Lime Green ^3Yellow ^4Navy Blue ^5Light Blue ^6purple ^7White/Default ^8Black ^9 Exampleself iPrintlnBold("^1Green Text"); [/CODE]A more unique and better method (Can only be used on createfrontstring())[CODE=cpp].color(Red,Green,Blue);[/CODE]Example[CODE=cpp]Text = createfontstring("objective", 1.5);Text setPoint("CENTER", "CENTER", 0, 0);Text setText("Green Text");Text.color(0,1,0);[/CODE][/SPOILER][SPOILER="Common GSC Controls"][CODE=cpp]if( self AdsButtonPressed() )if ( self AttackButtonPressed() )if ( self FragButtonPressed() )if ( self UseButtonPressed() ) (Reload Button)if ( self MeleeButtonPressed()self waittill( "weapon_change" ); can be used for Y but i dont recommend it for Menu controls but maybe an AC130 Script)[/CODE][/SPOILER]ZombiesMultiplayer
Hello everyone my name is Sheperdebops its been awhile since modded or even been here but just for abit of fun i decided to get in to it again.
Here you will find scripts for both multiplayer and zombies im just creating the thread for the time being.
Scripts can be submitted as well which is always helpful to others. GSC is dead yeah but its useful for those who are new to modding to understand the roots and also get a feel.
General Controls and Scripts
[SPOILER="Text"]Displays text in the middle
[CODE=cpp]self iPrintlnBold("Hello");[/CODE]
Top Left
[CODE=cpp]self iPrintln("Hello");[/CODE]
Create Permanent Text
[CODE=cpp]Text = createfontstring("objective", 1.5);
Text setPoint("CENTER", "CENTER", 0, 0);
Text setText("Hello");[/CODE][/SPOILER]
[SPOILER="Draw Shaders"][CODE=cpp]createRectangle(align,relative,x,y,width,height,color,shader,sort,alpha)
{
barElemBG = newClientHudElem( self );
barElemBG.elemType = "menu_bio_russian";
if ( !level.splitScreen )
barElemBG.x = -2;
barElemBG.y = -2;
}
barElemBG.width = width;
barElemBG.height = height;
barElemBG.align = align;
barElemBG.relative = relative;
barElemBG.xOffset = 0;
barElemBG.yOffset = 0;
barElemBG.children = [];
barElemBG.sort = sort;
barElemBG.color = color;
barElemBG.alpha = alpha;
barElemBG setParent( level.uiParent );
barElemBG setShader( shader, width , height );
barElemBG.hidden = false;
barElemBG setPoint(align,relative,x,y);
return barElemBG;
} [/CODE][/SPOILER]
[SPOILER="Colour Code for Text"]
Text Colours (Mainly used for iPrintlnBold & iPrintln can be used on createfrontstring())
[CODE=cpp]Green ^1
Red/Orange ^2
Lime Green ^3
Yellow ^4
Navy Blue ^5
Light Blue ^6
purple ^7
White/Default ^8
Black ^9
Example
self iPrintlnBold("^1Green Text");
[/CODE]
A more unique and better method (Can only be used on createfrontstring())
[CODE=cpp]
.color(Red,Green,Blue);
Text setText("Green Text");
Text.color(0,1,0);
[/CODE][/SPOILER]
[SPOILER="Common GSC Controls"][CODE=cpp]if( self AdsButtonPressed() )
if ( self AttackButtonPressed() )
if ( self FragButtonPressed() )
if ( self UseButtonPressed() ) (Reload Button)
if ( self MeleeButtonPressed()
self waittill( "weapon_change" ); can be used for Y but i dont recommend it for Menu controls but maybe an AC130 Script
)[/CODE][/SPOILER]
Zombies
Multiplayer