Post: GSC Resources
07-13-2016, 06:02 AM #1
EternalHabit
Former Staff
(adsbygoogle = window.adsbygoogle || []).push({}); A Thread For Everything BO2 GSC All In One Place

BO2 Engine Functions & Methods -
You must login or register to view this content.
You must login or register to view this content.
You must login or register to view this content.

GSC Dump
Multiplayer - You must login or register to view this content.
Zombies - You must login or register to view this content.

GSC Menu Bases
You must login or register to view this content.

GSC Editor's & Injector's
You must login or register to view this content.
You must login or register to view this content.
You must login or register to view this content.
You must login or register to view this content.

Decompiler's
You must login or register to view this content.
You must login or register to view this content.

Other Useful Accessories
You must login or register to view this content.
You must login or register to view this content.
You must login or register to view this content.
You must login or register to view this content.
You must login or register to view this content.
You must login or register to view this content.

Multiplayer Lists
FX List - You must login or register to view this content.
Shader List - You must login or register to view this content.
Weapon List - You must login or register to view this content.
Model List - You must login or register to view this content.
Vehicles - You must login or register to view this content.
Turrets - You must login or register to view this content.

Zombies Lists
FX List - You must login or register to view this content.
Model List - You must login or register to view this content.
My Personal Shader List - You must login or register to view this content.
Weapon List - You must login or register to view this content.

MP & ZM Lists
Character Bones - You must login or register to view this content.
DVARS List - You must login or register to view this content.
Sound List - You must login or register to view this content.
Visions - You must login or register to view this content.
Fonts - You must login or register to view this content.
Buttons Codes - You must login or register to view this content.
Animations - You must login or register to view this content.


Updated Overflow Fix
    init()
{
level.strings = [];

level thread onPlayerConnect();
}

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

for(;Winky Winky
{
self waittill("spawned_player");

if(!isDefined(level.overflowFixThreaded))
{
level.overflowFixThreaded = true;
level thread overflowFix();
}
}
}

recreateMenuText()
{
//re-create your text here using setSafeText, no need for calling "submenu" if using sharks base
}

overflowfix()
{
level endon("game_ended");
level endon("host_migration_begin");

test = level createServerFontString("default", 1);
test setText("xTUL");
test.alpha = 0;

if(GetDvar("g_gametype") == "sd")
limit = 45; //110 with _rank.gsc
else
limit = 55; //115 with _rank.gsc

for(;Winky Winky
{
level waittill("textset");
if(level.strings.size >= limit)
{
test ClearAllTextAfterHudElem();
level.strings = [];//re-building the string array

foreach(player in level.players)
{
if(isDefined(player.hasMenu) && player isVerified())//if the player has the menu and they are verified (change this to work with your menu)
{
if(isDefined(player.menu.open))//if the menu is open
player recreateMenuText();
}
}
}
}
}

setSafeText(text)
{
if (!isInArray(level.strings, text))
{
level.strings[level.strings.size] = text;
self setText(text);
level notify("textset");
}
else
self setText(text);
}


[How To] Set Value w/ Text + Explanation

Basically setValue isn't supposed to have any type of letters in it. But with this code you can do just that. What's the point of this? Well, setValue will never overflow so it's good for zombie counters or anything like that.

    //Example Code
SetvalueWtext()
{
lol = createText("small", 1.5, "CENTER", "CENTER", 0, 0, 1, 1);
lol.label = &"Origin: ";

for(;Winky Winky
{
wait .05;
lol setValue(self getOrigin()[2]);
}
}

createText(font, fontScale, align, relative, x, y, sort, alpha)
{
textElem = self createFontString(font, fontScale);
textElem setPoint(align, relative, x, y);
textElem.sort = sort;
textElem.alpha = alpha;
return textElem;
}
//When overflow fixing, put this inside recreateText or else the text messes up
//lol.label = &"Origin: ";



Credits:
There would be way too many credits to give, if you contributed to this thread somehow. Then you should know who you are.
Last edited by EternalHabit ; 08-24-2017 at 04:25 PM.

The following 28 users say thank you to EternalHabit for this useful post:

/SneakerStreet/, anthonything, anxify, BlueeHasSwag, BoatyMcBoatFace, BullyWiiPlaza, codybenti, CrEaTiiOn_CuTie, DF_AUS, DoraTheKiller97, DrifterTheHomie, HiddenHour, Humble, Im_YouViolateMe, itsSorrow, JustFuSiOn, L33T HAXOR, MozeyModz, Nothingbutbread, ODLeslie, OfficialCoolJay, Pink Guy, ProfoundModz, sandro oliveira, Kronos, TehMerkMods, warcos, zatb15
07-25-2016, 11:10 AM #20
DoraTheKiller97
Treasure hunter
Should add Terminus to this!
07-25-2016, 11:39 AM #21
anthonything
Space Ninja
Originally posted by xTurntUpLobbies View Post
You really don't even need the _rank.gsc with this version of the overflow fix. The _rank.gsc is better for people that don't want to add an overflow fix.


Or for people with several clients with open menus :P
07-26-2016, 05:43 PM #22
EternalHabit
Former Staff
Originally posted by JustFuSiOn View Post
Sure, could you let me know if you fix it? Thanks.


okay so here's what I found. The problem cannot be fixed since clearAllTextAfterHudElem can only clear about 120 "unique" strings (I haven't tried higher but 130 will crash your game). The old overflow fix counted every single string so we never knew about the issue. Which basically means the old overflow fix was tricking you into thinking you had more strings to use. So use the new overflow fix with the _rank.gsc and set it too about 115
07-26-2016, 08:03 PM #23
JustFuSiOn
Are you high?
Originally posted by xTurntUpLobbies View Post
okay so here's what I found. The problem cannot be fixed since clearAllTextAfterHudElem can only clear about 120 "unique" strings (I haven't tried higher but 130 will crash your game). The old overflow fix counted every single string so we never knew about the issue. Which basically means the old overflow fix was tricking you into thinking you had more strings to use. So use the new overflow fix with the _rank.gsc and set it too about 115


Yeah I noticed that when I was testing a few fixes, I took it to 126 but didn't try anything higher because my menu started getting the "Maximum parent script variables" error (not due to the overflow fix) so I decided to stop testing until I fix it.
Last edited by JustFuSiOn ; 08-01-2016 at 10:04 AM.
08-06-2016, 01:30 PM #24
DexyStorm
Save Point
Thanks ! I love it, this is useful for me
08-06-2016, 05:20 PM #25
anthonything
Space Ninja
Originally posted by xTurntUpLobbies View Post
okay so here's what I found. The problem cannot be fixed since clearAllTextAfterHudElem can only clear about 120 "unique" strings (I haven't tried higher but 130 will crash your game). The old overflow fix counted every single string so we never knew about the issue. Which basically means the old overflow fix was tricking you into thinking you had more strings to use. So use the new overflow fix with the _rank.gsc and set it too about 115


It definitely can be fixed. You just need a midway anchor.
08-10-2016, 03:22 PM #26
xSynthmodz
Do a barrel roll!
great
08-11-2016, 02:46 PM #27
I want to know if also I put this right? You must login or register to view this content. , You must login or register to view this content. , You must login or register to view this content. , You must login or register to view this content.
08-19-2016, 03:21 AM #28
Devilemi
Can’t trickshot me!
Nice is useful, thanks

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo