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
04-02-2012, 10:43 AM #20
Correy
I'm the Original
Originally posted by x. View Post
ERROR: function "init()" already defined.. :derp:


put it in the init :p

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo