CounterStrikeSharp icon indicating copy to clipboard operation
CounterStrikeSharp copied to clipboard

Server.PrecacheModel does not take effect (?)

Open ELDment opened this issue 1 year ago • 5 comments

I have tested this API on Linux and Windows platforms, but it cannot precache my model as expected (the proof is when I use "CBaseModelEntity.SetModel()", the system prompts the model file cannot be found.) Ps.

  • I used Server.PrecacheModel() on OnMapStart.
  • the "(?)" in the title indicates that I am not 100% certain about it (it may be due to my improper use)
  • If my usage is incorrect, please guide me! 🎈

ELDment avatar Feb 24 '24 11:02 ELDment

Precaching has changed significantly since CSGO, which is what these precache methods are based on, so it's possible they don't work.

More work needs to be done to support this natively, Killstreak has done a plugin for custom resources: https://github.com/KillStr3aK/ResourcePrecacher

roflmuffin avatar Feb 25 '24 02:02 roflmuffin

Precaching has changed significantly since CSGO, which is what these precache methods are based on, so it's possible they don't work.

More work needs to be done to support this natively, Killstreak has done a plugin for custom resources: https://github.com/KillStr3aK/ResourcePrecacher

Will this plugin be embedded into counterstrikesharp in the future?

samyycX avatar Feb 25 '24 12:02 samyycX

Precaching has changed significantly since CSGO, which is what these precache methods are based on, so it's possible they don't work. More work needs to be done to support this natively, Killstreak has done a plugin for custom resources: https://github.com/KillStr3aK/ResourcePrecacher

Will this plugin be embedded into counterstrikesharp in the future?

The plugin won't be, but a method to do what this plugin does within your own plugin would be.

roflmuffin avatar Feb 25 '24 14:02 roflmuffin

We could implement a custom gamesystem to ensure resource precaching

KillStr3aK avatar Feb 27 '24 00:02 KillStr3aK

#358

KillStr3aK avatar Mar 01 '24 01:03 KillStr3aK

It looks like this was implemented, if I'm wrong, or if you think this is still an issue please re-open the issue.

B3none avatar Nov 09 '24 12:11 B3none