View Single Post
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-14-2022 , 07:46   Re: Precache 512 Smart Solutions (?)
Reply With Quote #7

Quote:
There are zombie servers that work a lot with models and about 150 maps. The question is, how to add 150 maps without causing error 512? since 150 maps use many models, many indeed. Out generated sounds. Is there a smart solution for this?
I think you're misunderstanding this, or at least you didn't express yourself properly.
The number of maps has nothing to do here. You can have 100.000 maps if you really want to. It's the number of models on the CURRENT map that matters, not the amount of maps you have in your server.

Quote:
I heard that it is possible to save space in the precache using " precache_generic" instead of "precache_sounds" or models, but I don't understand even seeing about 25 threads on the subject. How to use precache_generic? how to use the same precache_generic for models?
precache_generic() can only be used on models/sounds that are used client-side and don't require the server to precache them. Basically, you're only using it to make people download the file.

Things that can be precached this way are sounds played via client_cmd() (sounds that are played via the player's console) and player models.

This does not include sounds played via emit_sound() or other methods, so regarding the plugin you posted - no, sounds emitted from the knife must be precached using precache_sound() and will count towards the 512 limit.

I'm assuming you have a lot of player models in your server and they are precached using precache_model(). This is something you can change immediately and free up space. I tested having 1000+ player models active in a server once to prove this can be done.

Also have in mind that AMXX itself made the mistake of precaching sounds with precache_sound() when it didn't need to. I personally committed this change in AMXX 1.10 (https://github.com/alliedmodders/amxmodx/pull/934), so upgrading your AMXX (or at least the base plugins) can also free up space.

Only thing you need to remember when changing precache_sound() to precache_generic() is that "sound/" must be included in the file path. Example:

Code:
precache_sound("myfolder/mysound.wav")

Should be:

Code:
precache_generic("sound/myfolder/mysound.wav")
__________________

Last edited by OciXCrom; 05-14-2022 at 07:49.
OciXCrom is offline
Send a message via Skype™ to OciXCrom