AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Solved Prevent Crashing (https://forums.alliedmods.net/showthread.php?t=332929)

AnimalMonster 06-09-2021 09:46

Prevent Crashing
 
Hey, i recently started to remake a old addons but my problem is the 512 limit, all good, got an unprecacher, but, some weapons' models i add has the base weapon on some of the unprecached weapons and i want to provent model change but i don't know how i should do that, by using Ham and hook spawn and setmodel and then supercede? By using fakemeta think then change the unprecached models if they re used with an empty model? I thought i could actually use Entity Resource Replacement plugin but didn't work...

AnimalMonster 06-09-2021 12:07

Re: Prevent Crashing
 
Or never mind, it s just a **** problem evwryone has and cannot be avoided, that s probably it

CrazY. 06-09-2021 12:30

Re: Prevent Crashing
 
You'll need to hook DefaultDeploy.
https://github.com/s1lentq/ReGameDLL...pons.cpp#L1337

AnimalMonster 06-10-2021 22:50

Re: Prevent Crashing
 
Thanks, i'm going to try this right away

AnimalMonster 06-12-2021 13:44

Re: Prevent Crashing
 
What about world models? Weapon's world model.

Natsheh 06-12-2021 18:25

Re: Prevent Crashing
 
You can hook FM_SetModel i assume

AnimalMonster 06-13-2021 19:40

Re: Prevent Crashing
 
Quote:

Originally Posted by Natsheh (Post 2749587)
You can hook FM_SetModel i assume

i've tried it already, fail.

Natsheh 06-13-2021 23:44

Re: Prevent Crashing
 
The question is when are you hooking it?

AnimalMonster 06-14-2021 00:05

Re: Prevent Crashing
 
Quote:

Originally Posted by Natsheh (Post 2749672)
The question is when are you hooking it?

on plugin init, but does it matter? since it should be called before setting the model so i could supercede it. I'll try a second time so i won't say some stupid thing.

Edit: nvm, it worked this time thanks @Natsheh and @CrazY. rukia :bacon: :)

in previous try on this i usev pev to get the model, im so d*** :))))

HamletEagle 06-14-2021 04:36

Re: Prevent Crashing
 
How exactly did you use Entity Resource Replacement?
What exactly did not work? If you use complete replacement then models are not precached. If you use dynamic replacement then old models will still be precached.


All times are GMT -4. The time now is 02:36.

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