![]() |
Re: [CZ] Changing model directory "on the fly"?
yea sound changing is still possible
8.3.5.155:27015 -highly modded server.. this server dumps all of it's own server's sounds into a folder in the sound folder. |
Re: [CZ] Changing model directory "on the fly"?
Well I guess whatever works will be good :D
I'm quite looking forward to this! <edit> That server only seems to have custom sounds for "say" commands and "round win", which are usually just different "Terrorist Win" wav files. It also has skin selection, but this isn't automatic. http://www.radclan.net/index.php?page=Plugins |
Re: [CZ] Changing model directory "on the fly"?
Quote:
MOD ROOT / sound / %s / hostage / or MOD ROOT / models / %s / player / or MOD ROOT / models / %s / etc.... PS - If you need any testing doing, just hit me up :) |
Re: [CZ] Changing model directory "on the fly"?
I have finished the normal model changing and the sound should be done today.
The player models will require me to research it first since I have never changed them in a server-side plugin. Also, new player models have to be precached manually so players download them and won't be invisible due to the missing model. But the playermodel changing shouldn't be too hard, it does seem odd though. If I change the client's model keyvalue to "models/rock2/player/demo/demo.mdl" the model dissappears. I know it's been done so it shouldn't be too hard to get it working. |
Re: [CZ] Changing model directory "on the fly"?
Can anyone confirm that you can change a player's model in cs/cz by changing the "model" keyvalue on the client?
It doesn't work that way in tfc and I'm still downloading CS from steam so I can't test it for myself. I hope this works out for player models, if it doesn't then I apologize for suggesting it could be done. Though the gameplay models and sounds will have no problems at all being switched. |
Re: [CZ] Changing model directory "on the fly"?
yes it seems possible.
as here is some code from VexdUM module for amx VexdUM.cpp: Code:
static cell AMX_NATIVE_CALL CS_SetModel(AMX *amx, cell *params) { Code:
// pfnPlayerPostThink, this code is to set the model at a specified time. Code:
// Engine message functions. |
Re: [CZ] Changing model directory "on the fly"?
Thanks alot, I'll get around to finishing this once I get a test server set up.
[Update] I have it partially working, though it will only load models if it has its own directory under models/player. What this means is that models/player/cs_assault/blah will not work, what will work is if you make the "blah" directory in your models/player folder. I have tried to get it to work the other way but it _really_ screws up the path, something like "models/player/cs_assault/onos/onos.mdl/cs_as". I'm guessing config files will be needed for each map but for player models only, it will also setup precaching so that all clients have the new models. |
Re: [CZ] Changing model directory "on the fly"?
So, if I understand this properly -
If CS/CZ wants to load the leet.mdl for instance, it will now try to load - mod root/models/player/mapname/leet/leet.mdl ? If that's correct, what will the path be to the other models and the sounds directory? Would it even be easier to just have a config frile for each map so you don't need to make global changes? If there is no config, then standard models apply etc... |
Re: [CZ] Changing model directory "on the fly"?
The way CS works is the "model" value on the client specifies a directory and model name in the "models/player" folder.
Unfortunately this means that you cannot just create a "mapname" subdirectory and redirect model paths to use it since the path gets messed up somehow. So if you want to change a model you need to do this: NOTE: This is only for player models! Normal ones are automatic! - Create the "modchange_cfgs" directory in the mod root ( ie. "cstrike" ) - For each map you want to switch the models on create a new file called "mapname".txt - Make a new directory in your models/player folder with a name you can remember ( ie. "cs_assault_onos" ) - Copy your replacement model into that folder and rename it to the folder name The format of the config file is very simple, all it is is this - original_model=new_model. Example: Code:
All the replacement models in the config will be precached to make sure they download to all the clients. Still working on it now, will have a screenshot soon. |
Re: [CZ] Changing model directory "on the fly"?
Okay, so that is a bit clearer :)
Just to recap (in CZ terms!) I will have a folder in my czero directory named "modchange_cfgs" or something a little easier to remember :) In that folder I will have various .txt files named after each map I want to alter. In, for example, de_piranesi_cz.txt I will need to type something like - sas=ct gign=ct gsg9=ct urban=ct spetsnaz=ct leet=t terror=t guerilla=t militia=t arctic=t Then in my models/player directory I need two directories called - models/player/de_piranesi_cz_ct and models/player/de_piranesi_cz_t with models in them called - de_piranesi_cz_ct.mdl and de_piranesi_cz_t.mdl PHEW!! (I've made a CZ map an example as they have the most confusing mapnames yet! If I can understand that, then I am set!) ....or am I a bit tired from being in the sun too long? 8D <edit> Oh yes, and will the other models and sounds take the same structure? |
All times are GMT +2. The time now is 03:19. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.