Raised This Month: $ Target: $400
 0% 

Unprecache all Weapons


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 08-19-2013 , 04:33   Unprecache all Weapons
Reply With Quote #1

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?
__________________
Kia is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-19-2013 , 05:50   Re: Unprecache all Weapons
Reply With Quote #2

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.
__________________

Last edited by Arkshine; 08-19-2013 at 05:57.
Arkshine is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 08-19-2013 , 06:56   Re: Unprecache all Weapons
Reply With Quote #3

Ehh, I'll try my best doing that. ^^
__________________
Kia is offline
nato
Junior Member
Join Date: Jul 2011
Old 08-19-2013 , 07:03   Re: Unprecache all Weapons
Reply With Quote #4

you register FM_PrecacheModel FM_PrecacheSound pre in plugin_precache FMRES_SUPERCEDE block

Last edited by nato; 08-19-2013 at 07:05.
nato is offline
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 15:50.


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