AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   models problem :\ i think its easy help.. (https://forums.alliedmods.net/showthread.php?t=20156)

haimmaik 11-02-2005 19:13

models problem :\ i think its easy help..
 
i made a plugin that changes the player model into something else
but it forces me to put the model in a special directory.

example:
if i want to use the model:
"warrior.mdl"
it doesnt matter where i put it.. it will always search it at:
"models\player\warrior\warrior.mdl"

if i want 4 models:
"warrior1.mdl"
"warrior2.mdl"
"warrior3.mdl"
"warrior4.mdl"

it will look for them at:
"models\player\warrior1\warrior1.mdl"
"models\player\warrior2\warrior2.mdl"
"models\player\warrior3\warrior3.mdl"
"models\player\warrior4\warrior4.mdl"

my point is.. that i want all 4 models to be in the SAME directory. how i do that?

NOTE:
its NOT a precache thing.. i precached them in other directories.
when i try to USE them.. the game always search them at
models\player\[name]\[name].mdl

i used the command:
cs_set_user_model(id,name)

Hawk552 11-02-2005 19:32

You can't set it to something outside of player, without forcing it in the engine or fakemeta level.

It wouldn't show correctly though, if you forced a monster / weapon (or whatever) model on a player.

haimmaik 11-02-2005 20:07

its ok with me that all of them will be inside player...
but i want at least 1 folder to contain all of them 2grther

models\player\XXXXX\warrior1\warrior1.mdl
models\player\XXXXX\warrior2\warrior2.mdl
models\player\XXXXX\warrior3\warrior3.mdl
models\player\XXXXX\warrior4\warrior4.mdl

see?? all of them in 1 directory ("XXXXX")

Zenith77 11-02-2005 20:14

put your folder under models/player ... volia

Hawk552 11-02-2005 20:21

I don't think you can do it like that.

You can always use engine to set their model.

haimmaik 11-02-2005 20:26

hay Zenith ur here O_O why dont u log into the MSN?

Zenith77 11-02-2005 20:29

mmm about to get off anyway, a friend is coming over....



but you can do this....


Code:
public plugin_precache() { precache_model("models/player/myfolder/mymodel.mdl") } public myFunc(id) { cs_set_user_model(id, "mymodel.mdl") }

haimmaik 11-02-2005 20:31

ok ill try...
btw, i solved the trail problem

XxAvalanchexX 11-02-2005 22:51

Quote:

Originally Posted by Hawk552
You can always use engine to set their model.

That won't work with players.

Quote:

Originally Posted by Zenith77
Code:
cs_set_user_model(id, "mymodel.mdl")

It should be mymodel, not mymodel.mdl


As per the original question, if you intend to use cs_set_user_model, you have to follow the directory structure it uses.

LynX 11-03-2005 05:27

Code:
entity_set_string(id, EV_SZ_model, "modelpath")

Code:
entity_set_model(id, "modelpath")

You can do these 2 ways.

I was asking PM about this matter before, he said both of ways work.


All times are GMT -4. The time now is 23:44.

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