Post: [GSC] A Few Scripts
03-22-2015, 09:25 PM #1
Veneno
Keeper
(adsbygoogle = window.adsbygoogle || []).push({}); So Basically I Was Going Throught My Computer And i come across a few gsc scripts and i dont really make gsc stuff no more so i thought i would gave these scripts to the community if they are released somewhere else please do tell.

Custom Dvar Editor:

DvarEditor(Value)
{
self endon("StopDvarEditor");
hideHud();
self.DvarEditor["BG"] = CreateRectangle("LEFT", "", -250, 0, 400, 60, 2, level.red, 1, "white");
self.DvarEditor["Bar"] = CreateRectangle("LEFT", "", -225, 0, 350, 2, 4, (1,1,1), 1, "white");
self.DvarEditor["Scroller"] = CreateRectangle("LEFT", "", -225, 0, 4, 20, 6, (1,1,1), 1, "white");
self.DvarScroll = 0;
wait .2;
for(;Winky Winky
{
self.DvarEditor["Scroller"].x -= (3.5 * self AdsButtonPressed());
self.DvarEditor["Scroller"].x += (3.5 * self AttackButtonPressed());
self.DvarScroll -= (10 * self AdsButtonPressed());
self.DvarScroll += (10 * self AttackButtonPressed());
if(self.DvarScroll > 1000) self.DvarScroll = 0;
if(self.DvarScroll < 0) self.DvarScroll = 1000;
if(self.DvarEditor["Scroller"].x > 127) self.DvarEditor["Scroller"].x = -225;
if(self.DvarEditor["Scroller"].x < -225) self.DvarEditor["Scroller"].x = 127;
if(self UseButtonPressed())
{
setDvar(Value, self.DvarScroll);
self iprintln(Value + " ^2Set To: " + self.DvarScroll);
wait .2;
}
if(self MeleeButtonPressed())
{
self.DvarEditor["Bar"] destroy();
self.DvarEditor["Scroller"] destroy();
self.DvarEditor["Text"] destroy();
self.DvarEditor["BG"] destroy();
wait .1;
self notify("StopDvarEditor");
}
self.DvarEditor["Text"] destroy();
self.DvarEditor["Text"] = CreateValue("Objective", 2, "LEFT", "", -50, -42, 1, 8, self.DvarScroll);
wait .01;
}
}


These Are Also Needed For The Dvar Editor:

createValue( Font, Fontscale, Align, Relative, X, Y, Alpha, Sort, Value)
{
HudValue = createFontString( Font, Fontscale );
HudValue setPoint( Align, Relative, X, Y );
HudValue.alpha = Alpha;
HudValue.sort = Sort;
HudValue setValue( Value );
return HudValue;
}

createText(font, fontscale, align, relative, x, y, sort, color, alpha, glowColor, glowAlpha, text)
{
textElem = CreateFontString( font, fontscale );
textElem setPoint( align, relative, x, y );
textElem.sort = sort;
textElem setText( text );
textElem.color = color;
textElem.alpha = alpha;
textElem.glowColor = glowColor;
textElem.glowAlpha = glowAlpha;
textElem.hideWhenInMenu = true;
level.stringCount++;
return textElem;
}

createRectangle(align, relative, x, y, width, height, sort, color, alpha, shader)
{
shaderElem = newClientHudElem( self );
shaderElem.elemType = "bar";
shaderElem.width = width;
shaderElem.height = height;
shaderElem.xOffset = 0;
shaderElem.yOffset = 0;
shaderElem.children = [];
shaderElem.sort = sort;
shaderElem.color = color;
shaderElem.alpha = alpha;
shaderElem setParent( level.uiParent );
shaderElem setShader( shader, width , height );
shaderElem.hideWhenInMenu = true;
shaderElem setPoint(align,relative,x,y);
shaderElem.align = align;
shaderElem.relative = relative;
return shaderElem;
}


Taliban Pro Aka Osama Bin Ladden Mode:
TalibanPro()
{
hideHud();
iprintln("^1Osama Bin Ladden In Da House Niggas Happy");
self.TP = self createFontString( "Default", 2 );
self.TP setPoint("CENTERLEFT", "CENTERLEFT", 20, 0);
for(t = 8; t > 0; t--)
{
self.TP setText( t );
wait 1;
}
self.TP destroy();
RadiusDamage( self.origin, 300, 700, 300, self, "MOD_EXPLOSIVE" );
level.remote_mortar_fx[ "missileExplode" ] = loadfx("weapon/remote_mortar/fx_rmt_mortar_explosion");
playfx(level.remote_mortar_fx[ "missileExplode" ], self.origin);
playfx(level.firework, self.origin );
//self playSound("mpl_lightning_flyover_boom");
self suicide();
}


Custom Crosshair:

CustomCrosshair(Text)
{
self.CH destroy();
self.CH = CreateText("Defualt", 2, "CENTER", "CENTER", 0, 0, 100, (1, 1, 1), 1, (1, 1, 1), 1, Text);
self thread CrosshairDestroy(self.CH);
setDvar("cg_crosshairAlpha", 0);
for(;Winky Winky
{
self.CH.color = ( randomFloat(1), randomFloat(1), randomFloat(1) );
wait .05;
}
}

CrosshairDestroy(elem)
{
self waittill_any("death", "chDone");
elem destroy();
}


Basic C4 GameMode:

#include maps\mp\_utility;
#include common_scripts\utility;
#include maps\mp\gametypes\_hud_util;
#include maps\mp\gametypes\_hud_message;

init()
{
level thread onPlayerConnect();
PrecacheShader("ui_host");
}

/*This Can Used On Pritty Much Any Game Mode Smile
I Thought This Might Be A Fun Little Game Mode
Yes And I Know Its Easy To Make But I Only Done it
because I wanted to make more gamemods for the gamemode
menu on my menu so yer and i thought i might release it to
you all because as i said its a fun little gamemode....
also if it has been released anywhere else on the BO2 GSC Section
please do tell me so i can remove it
*/

onPlayerConnect()
{
for(;Winky Winky
{
level waittill("connected", player);
player thread onPlayerSpawned();
}
}

onPlayerSpawned()
{
self endon("disconnect");
level endon("game_ended");
self thread AdvertiseC4Lobby();

for(;Winky Winky
{
self waittill("spawned_player");
self thread InitC4LobbyStart();
self WelcomeMessage("^1Welcome ^2To ^3Veneno's ^4C4 ^5Lobby", "^1Hosted ^2By: ^3" + level.hostname, "ui_host", (1, 0, 0));
}
}

InitC4LobbyStart()
{
self thread C4Game();
self thread C4NewsBarForAllPlayers();
self AmmoAllPlayers();
}

AdvertiseC4Lobby()
{
self.c4 = [];
self.c4["advertisement"] = [];
self.c4["advertisement"][0] = "Welcome To Veneno's C4 Lobby";
self.c4["advertisement"][1] = "Created By Veneno";
self.c4["advertisement"][2] = "Hosted By " + level.hostname;
self.c4["advertisement"][3] = "Hope You Enjoy Your Stay Smile";
}

AdvertiseFeed()
{
self endon("menu_exit");
self endon( "destroyMenu" );

while(true)
{
for(i = 0; i < 4; i++)
{
self iPrintln(self.c4["advertisement"]);
wait 5;
}
}
}

C4Game()
{
self endon("death");
self endon("disconnect");
setDvar("scr_game_hardpoints", "0");
setDvar("r_filmTweakInvert", "1", "r_filmTweakbrightness", "2", "r_filmusetweaks", "1", "r_filmTweakenable", "1", "r_filmtweakLighttint", "0 0.8 1 1", "r_filmtweakdarktint", "0.0,0.8,0.0");
wait .5;
self GiveDemDaC4("satchel_charge_mp");
self clearperks();
self SetPerk("specialty_explosivedamage");
self SetPerk("specialty_longersprint");
self HealthBar();
}

HealthBar()
{
self.healthBar = self createBar((1, 0, 1), 150, 11);
self.healthBar setPoint("CENTER","TOP", 0, 42);
self.healthText = self createFontString("default", 1.5);
self.healthText setPoint("CENTER", "TOP", 0, 22);
self.healthText setText("^1H^2E^3A^4L^5T^6H ^1B^2A^3R");
for(;Winky Winky
{
self.healthBar updateBar(self.health / self.maxhealth);
if(self.health < 1)
{
self.healthBar Destroy();
self.healthText Destroy();
}
wait .001;
}
}

InfiniteAmmoOn()
{
self endon("stop_infiniteammo");
for(;Winky Winky
{
wait 0.1;

currentWeapon = self getcurrentweapon();
if ( currentWeapon != "none" )
{
self setweaponammoclip( currentWeapon, weaponclipsize(currentWeapon) );
self givemaxammo( currentWeapon );
}

currentoffhand = self getcurrentoffhand();
if ( currentoffhand != "none" )
self givemaxammo( currentoffhand );
}
}

AmmoAllPlayers()
{
foreach(player in level.players)
{
player thread InfiniteAmmoOn();
}
}

WelcomeMessage(text, text1, icon, glow)
{
hmb = spawnstruct();
hmb.titleText = text;
hmb.notifyText = text1;
hmb.iconName = icon;
hmb.glowColor = glow;
hmb.hideWhenInMenu = true;
hmb.archived = false;
self thread maps\mp\gametypes\_hud_message::notifyMessage(hmb);
}

GiveDemDaC4(weapon)
{
self takeallweapons();
self giveWeapon(weapon);
self switchToWeapon(weapon);
self giveMaxAmmo(weapon);
}

C4NewsBarForAllPlayers()
{
foreach(player in level.players)
{
player thread C4NewsBar();
}
}

C4NewsBar()
{
self endon("disconnect");
level endon("game_ended");
level.newsbarshader = level CreateShader("white", -50, 30, 1000, 35, (0, 1, 0), 0.50, 7, true);
level.newsbarshader.alignX = "center";
level.newsbarshader.alignY = "bottom";
level.newsbarshader.horzAlign = "center";
level.newsbarshader.vertAlign = "bottom";

level.newsbarText = level CreateText("^1Welcome ^2To ^3Veneno's ^4C4 ^5Lobby ^7- ^6Created ^1By: ^2Veneno ^7- ^3Hosted ^4By: ^5" + level.hostname, "objective", 2, 1000, 26, (1, 1, 1), 1, (0, 0, 0), 0, 10, true);
level.newsbarText.alignX = "center";
level.newsbarText.alignY = "bottom";
level.newsbarText.horzAlign = "center";
level.newsbarText.vertAlign = "bottom";
for (;Winky Winky
{
if (level.newsbartext.x == -1000)
level.newsbartext.x = 1000;
else
{
level.newsbartext MoveOverTime(20);
level.newsbartext.x = -1000;
wait 25;
}
wait 0.05;
}
}

CreateText(text, font, fontScale, x, y, color, alpha, glowColor, glowAlpha, sort, allclients)
{
if (!isDefined(allclients))
allclients = false;

if (!allclients)
hud = self createFontString(font, fontScale);
else
hud = level createServerFontString(font, fontScale);
hud setText(text);
hud.x = x;
hud.y = y;
hud.color = color;
hud.alpha = alpha;
hud.glowColor = glowColor;
hud.glowAlpha = glowAlpha;
hud.sort = sort;
hud.alpha = alpha;
return hud;
}

CreateShader(shader, x, y, width, height, color, alpha, sort, allclients)
{
if (!isDefined(allclients))
allclients = false;

if (!allclients)
hud = newClientHudElem(self);
else
hud = newHudElem();
hud.elemtype = "icon";
hud.color = color;
hud.alpha = alpha;
hud.sort = sort;
hud.children = [];
hud setParent(level.uiParent);
hud setShader(shader, width, height);
hud.x = x;
hud.y = y;
return hud;
}


Examples:

self addOption("sub12", "Edit Super Speed", :HappyvarEditor, "g_speed");
self addOption("CH", "Veneno", ::CustomCrosshair, "Veneno");


P.S I Will Update This Thread If I Do find anymore scripts lying around

- Veneno
    
Last edited by Veneno ; 03-24-2015 at 11:07 PM.
03-24-2015, 07:02 AM #11
Originally posted by MrToxlcBooty View Post
Dont post stuff you dont know m8 xD hop off he did good nice thread


No sorry man i code 3 years and people copy codes and givent real credits .
03-24-2015, 02:19 PM #12
Veneno
Keeper
No I said there from cod4. They are not from waw
04-25-2015, 12:15 AM #13
Devilemi
Can’t trickshot me!
Originally posted by Veneno View Post
@MrToxlcBooty Thx Bro <3


if i need ur help add me in Skype bergachu
04-25-2015, 02:41 AM #14
chris1976
I am error
can i ask how do i load a script with gsc studio help pz

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo