This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Precache stopper


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:         
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 01-03-2005 , 16:44   Precache stopper
Reply With Quote #1

This is an experimental plugin that requires an equally experimental set of stocks. So here we go!

How it works:
On startup, it loads models from a file into an array. When things start being precached a split second later, my forwards hook the precache, check to see if the file being precached matches the ones we want to block, and if so, blocks them from being precached using SUPERCEDE.

Then, when ever an entity has a model set on it, this handy plugin checks to make sure it doesnt try to set the ent to a model we stopped from precaching.

End result: No precache of the model, and no crash.

Command:
amx_block_model <model>
Writes the model to custom vault file, and will block it next map change.

Requires: Cvault v1.17
Simply throw the cvault incude in along side your other includes and compile as normal. Cvault offers a wide variety of options, along with auto pruning and such. Use to your hearts content, just be sure to give credit to avalanche in your plugin, since he came up with the idea and the original code.

Note: Oops. Wrong custom vault file. Sorry ^^ Download this new one.
Attached Files
File Type: sma Get Plugin or Get Source (precache_stopper.sma - 1014 views - 1.6 KB)
File Type: zip cvault.zip (5.4 KB, 160 views)
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
Sp4rt4n
Senior Member
Join Date: Dec 2004
Old 01-18-2005 , 06:47  
Reply With Quote #2

when i try to run it, i get this error in the console:


L 01/18/2005 - 06:43:22: [AMXX] Run time error 3 (stack error) on line 130 (plugin "precache_stopper.amxx").
L 01/18/2005 - 06:43:22: [AMXX] Debug Trace =>
L 01/18/2005 - 06:43:22: [AMXX] [0] Line 130, File "cvault.inc"
L 01/18/2005 - 06:43:22: [AMXX] [1] Line 33, File "cvault.inc"
L 01/18/2005 - 06:43:22: [AMXX] [2] Line 27, File "precache_stopper.sma"
L 01/18/2005 - 06:43:22: [AMXX] [3] Line 14, File "precache_stopper.sma"
Sp4rt4n is offline
Send a message via MSN to Sp4rt4n
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 01-18-2005 , 13:54  
Reply With Quote #3

I did something similar for myself, and I'm assuming yours works the same way (with more customization). This will stop the models from precaching, but the server will crash if it tries to load them because there is no precache, so the uses are kind of limited. I've also tried removing the entity that uses the model as well, but I couldn't get it to work.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 01-19-2005 , 13:36  
Reply With Quote #4

Quote:
Originally Posted by XxAvalanchexX
I did something similar for myself, and I'm assuming yours works the same way (with more customization). This will stop the models from precaching, but the server will crash if it tries to load them because there is no precache, so the uses are kind of limited. I've also tried removing the entity that uses the model as well, but I couldn't get it to work.
Mine works fine, I posted the wrong edition. THIS is what happens when you dont test properly hehe.
You have to block the set model sequence or it sets the model and the whole thing goes down, which is very bad. It works rather well; I use it for entmod on my TS server.
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 01-20-2005 , 18:52  
Reply With Quote #5

Aha, nifty. I never would've thought of that. Nice job.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Breeze
Junior Member
Join Date: Mar 2005
Old 03-25-2005 , 18:41  
Reply With Quote #6

Would this work to allow more plugins to run stripping enough entities out before cvrashing on the 512 error?

or would this not remove the entities fast enough?
Breeze is offline
Send a message via AIM to Breeze
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 03-25-2005 , 18:55  
Reply With Quote #7

This plugin has been superceeded, use my stripper2 plugin for this functionality.
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
Breeze
Junior Member
Join Date: Mar 2005
Old 03-25-2005 , 20:01  
Reply With Quote #8

I am actually looking forwartd to stripper 2 for the ability to make maps better for replay im highly interested in being able to change positions of hostages and bomb sites to say a random of 4 locations per map

But are you saying that stripper two would help me strip out other entites and i would avoid this error?

You are familiar with what im talking about?
Breeze is offline
Send a message via AIM to Breeze
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 03-25-2005 , 22:32  
Reply With Quote #9

stripper2, my version, will allow you to destroy precaches, thus allowing you to have more plugins that require them.
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:14.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode