Raised This Month: $51 Target: $400
 12% 

Server side player models.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Remy Lebeau
Senior Member
Join Date: Dec 2009
Location: Sydney, Australia
Old 09-16-2013 , 04:05   Server side player models.
Reply With Quote #1

I'm mucking around a bit trying to setup custom (server side) player models.

I'm running into a problem at the very first hurdler. My setup is very simply:

I have a local LAN server setup to test on, I'm installing models from s-low.net directly onto the server (eg, cstrike/models/player and cstrike/materials/models/player), and then coding a basic plugin to change people's models when they join.

If I then manually install the models on my client computer, it works fine.

If I don't manually install the models, I get a big red error sign instead of the model, and on checking, the model is NOT being downloaded from the server to the client. I don't really know what is going on! Is there a command that tells the client to download content? I've checked my client settings, and it is set to download all content from server... I don't have anything like a highspeed download server setup, so I assume that should mean stuff gets downloaded directly...

Anyone have any ideas? I'm stumped!
Remy Lebeau is offline
andi67
Veteran Member
Join Date: Mar 2007
Location: Somewhere near you!!!
Old 09-16-2013 , 04:17   Re: Server side player models.
Reply With Quote #2

Check your paths you have setup for the models.....
__________________
Waiting for HL3,Day of Defeat3 ,but will it ever come? So I'm gonna play COD WW2.>>>>SM_SKINCHOOSER<<<<
>>You need Models for DODS/CSS/CSGO , than click here!!!<<
andi67 is offline
Remy Lebeau
Senior Member
Join Date: Dec 2009
Location: Sydney, Australia
Old 09-16-2013 , 04:28   Re: Server side player models.
Reply With Quote #3

Can you be more specific? As I said: if I manually install the models on both server and client, then it works fine.

The problem is that the client is not downloading the models from the server if they are not present...

edit: here is an example

C:\srcds\css\cstrike\models\player\slow\jamis \mkvsdcu\batman\slow_pub_v2.mdl
C:\srcds\css\cstrike\models\player\slow\jamis \mkvsdcu\batman\slow_pub_v2.dx80.vtx
C:\srcds\css\cstrike\models\player\slow\jamis \mkvsdcu\batman\slow_pub_v2.dx90.vtx
C:\srcds\css\cstrike\models\player\slow\jamis \mkvsdcu\batman\slow_pub_v2.phy
C:\srcds\css\cstrike\models\player\slow\jamis \mkvsdcu\batman\slow_pub_v2.sw.vtx
C:\srcds\css\cstrike\models\player\slow\jamis \mkvsdcu\batman\slow_pub_v2.vvd

I also have materials files in
C:\srcds\css\cstrike\materials\models\player\ slow\jamis\mkvsdcu\batman

I then use the code:
Code:
public OnMapStart()
{
    PrecacheModel("models/player/slow/jamis/mkvsdcu/batman/slow_pub_v2.mdl", true);
}


public OnWar3EventSpawn( client )
{
    SetEntityModel(client, "models/player/slow/jamis/mkvsdcu/batman/slow_pub_v2.mdl");
}
All I see are giant error signs! However, if I use a model that I KNOW I already have on my client computer, it works fine.

Last edited by Remy Lebeau; 09-16-2013 at 04:38.
Remy Lebeau is offline
rswallen
SourceMod Donor
Join Date: Jun 2013
Location: 127.0.0.1
Old 09-16-2013 , 04:58   Re: Server side player models.
Reply With Quote #4

PrecacheModel() only tells the client/server to load the file into memory.
In order to force clients to download missing models/materials/etc, you need to use AddFileToDownloadsTable()
rswallen is offline
Remy Lebeau
Senior Member
Join Date: Dec 2009
Location: Sydney, Australia
Old 09-16-2013 , 05:16   Re: Server side player models.
Reply With Quote #5

Quote:
Originally Posted by rswallen View Post
PrecacheModel() only tells the client/server to load the file into memory.
In order to force clients to download missing models/materials/etc, you need to use AddFileToDownloadsTable()
That looks promising! Do I need a separate entry for each file in the model / material folders for a particular model?
Remy Lebeau is offline
rswallen
SourceMod Donor
Join Date: Jun 2013
Location: 127.0.0.1
Old 09-16-2013 , 05:26   Re: Server side player models.
Reply With Quote #6

Quote:
Originally Posted by Remy Lebeau View Post
That looks promising! Do I need a separate entry for each file in the model / material folders for a particular model?
Yeah, one for each file involved in rendering a particular model
rswallen is offline
Remy Lebeau
Senior Member
Join Date: Dec 2009
Location: Sydney, Australia
Old 09-16-2013 , 05:26   Re: Server side player models.
Reply With Quote #7

Also - do I need something similar for custom maps? Or do they get downloaded automatically?

Thanks so much for that help, I was starting to go bananas!

Now to learn how to get a fast d/l server setup

Last edited by Remy Lebeau; 09-16-2013 at 05:27.
Remy Lebeau is offline
xf117
Senior Member
Join Date: Mar 2010
Location: Russia
Old 09-16-2013 , 05:36   Re: Server side player models.
Reply With Quote #8

You don't need that for custom maps.
xf117 is offline
Send a message via ICQ to xf117
Remy Lebeau
Senior Member
Join Date: Dec 2009
Location: Sydney, Australia
Old 09-16-2013 , 05:45   Re: Server side player models.
Reply With Quote #9

You guys rock my world.

Since you're being so awesome - do you know of a way I can test whether files are being downloaded from my game server or from my high speed server?
Remy Lebeau is offline
xf117
Senior Member
Join Date: Mar 2010
Location: Russia
Old 09-16-2013 , 05:59   Re: Server side player models.
Reply With Quote #10

I guess you can put archived files in fast dl (bz2). And look for a file name of a file you download.
Or try a really big file. Server has a restriction on file size if you download it directly.
xf117 is offline
Send a message via ICQ to xf117
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 06:16.


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