AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Unprecache all Weapons (https://forums.alliedmods.net/showthread.php?t=223993)

Kia 08-19-2013 04:33

Unprecache all Weapons
 
Hello everybody,

For my new Mod I need to precache over 300 files and to prevent breaking the 512 Item Precache Limit I want to unprecache all weapons (except Nades and Knife).
Is there a simple solution for doing that?

Arkshine 08-19-2013 05:50

Re: Unprecache all Weapons
 
Well, without using orpheu, hooking FM_Precache* forwards and blocking + making sure a player can't get a weapon unprecached, like blocking commands, probably some others forwards in case you get weapon from a plugin/map, etc. You can keep things simple if you are careful on what you're using (map, plugins, etc.)

With orpheu, you could unregister completely a weapon by hooking UTIL_PrecacheOtherWeapon ; and you make sure the "weapon_name" is not used, hooking CreateNamedEntity.

Kia 08-19-2013 06:56

Re: Unprecache all Weapons
 
Ehh, I'll try my best doing that. ^^

nato 08-19-2013 07:03

Re: Unprecache all Weapons
 
you register FM_PrecacheModel FM_PrecacheSound pre in plugin_precache FMRES_SUPERCEDE block


All times are GMT -4. The time now is 15:50.

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