AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [HL] Entity with studiomdl as playermodel (https://forums.alliedmods.net/showthread.php?t=346592)

Phant 03-05-2024 23:07

[HL] Entity with studiomdl as playermodel
 
In Half-Life, each player can set their desired player model (for example: model "zombie"). In doing so, they can specify any string for the model (model "abc"), and only those players who have that particular model ("models/player/abc/abc.mdl") present in their game client will see it. All others will see the default "gordon" model.

My question:
Can I add an entity on the map with studiomdl with the same logic?

bibu 03-06-2024 08:04

Re: [HL] Entity with studiomdl as playermodel
 
Should be possible. Just check if the file exists on the client, if so precache the model using fakemeta natives (it's during gametime possible) and set the model as usual. For non-exisiting clients use a default model which the same mentioned method.

Phant 03-06-2024 16:46

Re: [HL] Entity with studiomdl as playermodel
 
Quote:

Originally Posted by bibu (Post 2819070)
Just check if the file exists on the client

How it's possible?
I know about file_exists() function, but it's server-side?

Quote:

Originally Posted by bibu (Post 2819070)
precache the model using fakemeta natives (it's during gametime possible)

And again, EngFunc_PrecacheModel is server-side?

Natsheh 03-06-2024 22:53

Re: [HL] Entity with studiomdl as playermodel
 
I don't think its quiet possible because its not possible whether to know if the client have the file or not, its clientside code, you can give it a try...

DJEarthQuake 03-09-2024 00:02

Re: [HL] Entity with studiomdl as playermodel
 
If it's a bona fide 'player' model, use res file or precache. There is no need to see if they have the file already. The same fallback logic is applied.


All times are GMT -4. The time now is 16:10.

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