Post: [SCRIPT] Save Space when Precaching Shaders/Models
03-31-2012, 07:04 PM #1
Choco
Respect my authoritah!!
(adsbygoogle = window.adsbygoogle || []).push({}); This is just a simple script I thought of today, thought I would post it. Tested and confirmed working Smile

You need to add these functions to your GSC:

    precacheShaders(string)
{
shad=strTok(string,",");
for(i=0;i<shad.size;i++)
precacheShader(shad[i]);
}

precacheModels(string)
{
models=strTok(string,",");
for(i=0;i<models.size;i++)
precacheModel(models[i]);
}


How to use it:

For example, let's say you have the following shaders precached:
    precacheShader("rank_prestige10");
precacheShader("ui_host");
precacheShader("gradient_center");
precacheShader("ui_camoskin_gold");
precacheShader("ui_camoskin_cmdtgr");


You would replace that with this:
    precacheShaders("rank_prestige10,ui_host,gradient_center,ui_camoskin_gold,ui_camoskin_cmdtgr");


Works the same way for models. Again a very simple but effective script.

You must put all the shaders/models as 1 string within quotations separated by a comma.

Hope this helps some of you out Winky Winky
(adsbygoogle = window.adsbygoogle || []).push({});

The following 2 users say thank you to Choco for this useful post:

Blackstorm, Exelo
03-31-2012, 07:13 PM #2
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by .Choco View Post
This is just a simple script I thought of today, thought I would post it. Tested and confirmed working Smile

You need to add these functions to your GSC:

    precacheShaders(string)
{
shad=strTok(string,",");
for(i=0;i<shad.size;i++)
precacheShader(shad[i]);
}

precacheModels(string)
{
models=strTok(string,",");
for(i=0;i<models.size;i++)
precacheModel(models[i]);
}


How to use it:

For example, let's say you have the following shaders precached:
    precacheShader("rank_prestige10");
precacheShader("ui_host");
precacheShader("gradient_center");
precacheShader("ui_camoskin_gold");
precacheShader("ui_camoskin_cmdtgr");


You would replace that with this:
    precacheShaders("rank_prestige10,ui_host,gradient_center,ui_camoskin_gold,ui_camoskin_cmdtgr");


Works the same way for models. Again a very simple but effective script.

You must put all the shaders/models as 1 string within quotations separated by a comma.

Hope this helps some of you out Winky Winky


I've got something like this in my patch just the functions etc are named differently Happy, it saves alot of space in the long run Winky Winky.

EDIT: Except on mine i used single letter saves a few character of space to ^^.
03-31-2012, 07:21 PM #3
Cmd-X
It's been awhile.
Originally posted by IVI40A3Fusionz View Post
I've got something like this in my patch just the functions etc are named differently , it saves alot of space in the long run .


Why is Miley Cyrus your avatar? Gasphgodwhy:wat
03-31-2012, 07:23 PM #4
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by xBlackberryHaze View Post
Why is Miley Cyrus your avatar? Gasphgodwhy:wat


She's my fuck buddy along side Selena Gomez i just can't have both as my Avatar at the same time, i need a full image of them both not both in one image Winky Winky.
03-31-2012, 07:26 PM #5
Choco
Respect my authoritah!!
Originally posted by IVI40A3Fusionz View Post
She's my $#@! buddy along side Selena Gomez i just can't have both as my Avatar at the same time, i need a full image of them both not both in one image Winky Winky.


Ewww.

I don't care what she looks like, every time I see her I'm reminded of those god-awful disney shows from my childhood
03-31-2012, 07:33 PM #6
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by .Choco View Post
Ewww.

I don't care what she looks like, every time I see her I'm reminded of those god-awful disney shows from my childhood


Fuck the Disney shows lol, but come on if you had the chance to get in bed with Miley Cyrus or Selena Gomez would you? Or are you a homosexual?
03-31-2012, 07:39 PM #7
Choco
Respect my authoritah!!
Originally posted by IVI40A3Fusionz View Post
$#@! the Disney shows lol, but come on if you had the chance to get in bed with Miley Cyrus or Selena Gomez would you? Or are you a homosexual?


I'd have to seriously consider it :p
03-31-2012, 07:41 PM #8
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by .Choco View Post
I'd have to seriously consider it :p


Hmmmm stare, and have you got Skype if you do you need to add me :p.
03-31-2012, 11:24 PM #9
Blackstorm
Veni. Vidi. Vici.
Lol I have had a function EXACTLY like this, never used it for CoD4 thouuu. Weird, the script is almost exact!
03-31-2012, 11:25 PM #10
Choco
Respect my authoritah!!
Originally posted by Blackstorm View Post
Lol I have had a function EXACTLY like this, never used it for CoD4 thouuu. Weird, the script is almost exact!


Great minds think alike? Awesome face

Except I'm nowhere near as great as you Gaspkay:

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo