Raised This Month: $2 Target: $400
 0% 

Solved [Help] precache limit


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Thew_ConFiger
Junior Member
Join Date: Apr 2019
Old 05-21-2020 , 10:51   [Help] precache limit
Reply With Quote #1

Hello . I've been reading about these studies for some time. And I realized that there is a limit to everything on the server. I have jailbreak server . I dont want some models like v_galil.mdl on my server . I want to expand precache on my server . how can i delete original counter models on my server ?
Do you have a better offer for this?
__________________
Learn to read first. And you will succeed

Last edited by Thew_ConFiger; 05-24-2020 at 06:56.
Thew_ConFiger is offline
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 05-22-2020 , 13:57   Re: [Help] precache limit
Reply With Quote #2

https://forums.alliedmods.net/showthread.php?t=259880
https://forums.alliedmods.net/showthread.php?t=305967


And Dias made a plugin as well.

PHP Code:
#include <amxmodx>
#include <fakemeta>

#define PLUGIN "Addon: Precache Manager"
#define VERSION "1.0"
#define AUTHOR "Dias"

new Array:ArModel, Array:ArSound
new TempData[64]

new const 
UnPrecache_SoundList[125][] =
{
    
"models/w_antidote.mdl",
    
"models/w_security.mdl",
    
"models/w_longjump.mdl",
    
"items/suitcharge1.wav",
    
"items/suitchargeno1.wav",
    
"items/suitchargeok1.wav",
    
"common/wpn_hudoff.wav",
    
"common/wpn_hudon.wav",
    
"common/wpn_moveselect.wav",
    
"common/wpn_denyselect.wav",
    
"player/geiger6.wav",
    
"player/geiger5.wav",
    
"player/geiger4.wav",
    
"player/geiger3.wav",
    
"player/geiger2.wav",
    
"player/geiger1.wav  ",
    
"sprites/zerogxplode.spr",
    
"sprites/WXplo1.spr",
    
"sprites/steam1.spr",
    
"sprites/bubble.spr",
    
"sprites/bloodspray.spr",
    
"sprites/blood.spr",
    
"sprites/smokepuff.spr",
    
"sprites/eexplo.spr",
    
"sprites/fexplo.spr",
    
"sprites/fexplo1.spr",
    
"sprites/b-tele1.spr",
    
"sprites/c-tele1.spr",
    
"sprites/ledglow.spr",
    
"sprites/laserdot.spr",
    
"sprites/explode1.spr",
    
"weapons/bullet_hit1.wav",
    
"weapons/bullet_hit2.wav",
    
"items/weapondrop1.wav",
    
"weapons/generic_reload.wav",
    
"sprites/smoke.spr",
    
"buttons/bell1.wav",
    
"buttons/blip1.wav",
    
"buttons/blip2.wav",
    
"buttons/button11.wav",
    
"buttons/latchunlocked2.wav",
    
"buttons/lightswitch2.wav",
    
"ambience/quail1.wav",
    
"events/tutor_msg.wav",
    
"events/enemy_died.wav",
    
"events/friend_died.wav",
    
"events/task_complete.wav",
    
    
"weapons/ak47_clipout.wav",
    
"weapons/ak47_clipin.wav",
    
"weapons/ak47_boltpull.wav",
    
"weapons/aug_clipout.wav",
    
"weapons/aug_clipin.wav",
    
"weapons/aug_boltpull.wav",
    
"weapons/aug_boltslap.wav",
    
"weapons/aug_forearm.wav",
    
"weapons/c4_click.wav",
    
"weapons/c4_beep1.wav",
    
"weapons/c4_beep2.wav",
    
"weapons/c4_beep3.wav",
    
"weapons/c4_beep4.wav",
    
"weapons/c4_beep5.wav",
    
"weapons/c4_explode1.wav",
    
"weapons/c4_plant.wav",
    
"weapons/c4_disarm.wav",
    
"weapons/c4_disarmed.wav",
    
"weapons/elite_reloadstart.wav",
    
"weapons/elite_leftclipin.wav",
    
"weapons/elite_clipout.wav",
    
"weapons/elite_sliderelease.wav",
    
"weapons/elite_rightclipin.wav",
    
"weapons/elite_deploy.wav",
    
"weapons/famas_clipout.wav",
    
"weapons/famas_clipin.wav",
    
"weapons/famas_boltpull.wav",
    
"weapons/famas_boltslap.wav",
    
"weapons/famas_forearm.wav",
    
"weapons/g3sg1_slide.wav",
    
"weapons/g3sg1_clipin.wav",
    
"weapons/g3sg1_clipout.wav",
    
"weapons/galil_clipout.wav",
    
"weapons/galil_clipin.wav",
    
"weapons/galil_boltpull.wav",
    
"weapons/m4a1_clipin.wav",
    
"weapons/m4a1_clipout.wav",
    
"weapons/m4a1_boltpull.wav",
    
"weapons/m4a1_deploy.wav",
    
"weapons/m4a1_silencer_on.wav",
    
"weapons/m4a1_silencer_off.wav",
    
"weapons/m249_boxout.wav",
    
"weapons/m249_boxin.wav",
    
"weapons/m249_chain.wav",
    
"weapons/m249_coverup.wav",
    
"weapons/m249_coverdown.wav",
    
"weapons/mac10_clipout.wav",
    
"weapons/mac10_clipin.wav",
    
"weapons/mac10_boltpull.wav",
    
"weapons/mp5_clipout.wav",
    
"weapons/mp5_clipin.wav",
    
"weapons/mp5_slideback.wav",
    
"weapons/p90_clipout.wav",
    
"weapons/p90_clipin.wav",
    
"weapons/p90_boltpull.wav",
    
"weapons/p90_cliprelease.wav",
    
"weapons/p228_clipout.wav",
    
"weapons/p228_clipin.wav",
    
"weapons/p228_sliderelease.wav",
    
"weapons/p228_slidepull.wav",
    
"weapons/scout_bolt.wav",
    
"weapons/scout_clipin.wav",
    
"weapons/scout_clipout.wav",
    
"weapons/sg550_boltpull.wav",
    
"weapons/sg550_clipin.wav",
    
"weapons/sg550_clipout.wav",
    
"weapons/sg552_clipout.wav",
    
"weapons/sg552_clipin.wav",
    
"weapons/sg552_boltpull.wav",
    
"weapons/ump45_clipout.wav",
    
"weapons/ump45_clipin.wav",
    
"weapons/ump45_boltslap.wav",
    
"weapons/usp_clipout.wav",
    
"weapons/usp_clipin.wav",
    
"weapons/usp_silencer_on.wav",
    
"weapons/usp_silencer_off.wav",
    
"weapons/usp_sliderelease.wav",
    
"weapons/usp_slideback.wav"
}

new 
Shit

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
server_print("[ZD] Precache Manager: Reserved Slots (Model: %i | Sound: %i)"512 ArraySize(ArModel), 512 ArraySize(ArSound))
}

public 
plugin_precache()
{
    
ArModel ArrayCreate(641)
    
ArSound ArrayCreate(641)
    
    
register_forward(FM_PrecacheModel"fw_PrecacheModel")
    
register_forward(FM_PrecacheSound"fw_PrecacheSound")
}

public 
fw_PrecacheModel(const Model[])
{
    new 
Precached 0
    
    
for(new 0ArraySize(ArModel); i++)
    {
        
ArrayGetString(ArModeliTempDatasizeof(TempData))
        if(
equal(TempDataModel)) { Precached 1; break; }
    }
    
    if(!
PrecachedArrayPushString(ArModelModel)
}

public 
fw_PrecacheSound(const Sound[])
{
    if(
Sound[0] == 'h' && Sound[1] == 'o'
        return 
FMRES_SUPERCEDE
        
    write_file
("Sound.dias"SoundShit)
    
Shit++
    
    for(new 
0sizeof(UnPrecache_SoundList); i++)
    {
        if(
equal(SoundUnPrecache_SoundList[i]))
            return 
FMRES_SUPERCEDE
    
}
    
    
write_file("Sound2.dias"SoundShit)
    
Shit++
        
    new 
Precached 0
    
    
for(new 0ArraySize(ArSound); i++)
    {
        
ArrayGetString(ArSoundiTempDatasizeof(TempData))
        if(
equal(TempDataSound)) { Precached 1; break; }
    }
    
    if(!
PrecachedArrayPushString(ArSoundSound)
    
    return 
FMRES_HANDLED
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1042\\ f0\\ fs16 \n\\ par }
*/ 
__________________

Home of the AMX SUPER
Discord
DruGzOG is offline
Send a message via AIM to DruGzOG
karacasey
New Member
Join Date: Jun 2020
Old 07-01-2020 , 00:33   Re: [Help] precache limit
Reply With Quote #3

Thank you! This helps.
karacasey is offline
Reply


Thread Tools
Display Modes

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 15:08.


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