PDA

View Full Version : Set player model through menu


SaM.ThE.MaN
06-19-2010, 16:57
ok so here is the deal,

I have a menu with 2 items:

Choose Item :

1.Item a
2.Item a

Now when i choose Item a , i want it to give me a custom model.

i tried cs_set_model , but i cannot add my custom model.

my custom model location is in model/player/luffy/luffy.mdl

Ill thank any1 who helps me , (I wish the karma function was still there , so i could atleast say +k for any1 who helps -.-)

FLAMERS = please donot flame xD

fysiks
06-19-2010, 17:41
This has nothing to do with menus btw.

The folder should be "models" not "model".
The correct function to use is cs_set_user_model() (http://www.amxmodx.org/funcwiki.php?go=func&id=191).
I believe you reference the model by just the filename without extension so in your case it would be "luffy".

Vechta
06-20-2010, 03:52
This has nothing to do with menus btw.

The folder should be "models" not "model".
The correct function to use is cs_set_user_model() (http://www.amxmodx.org/funcwiki.php?go=func&id=191).
I believe you reference the model by just the filename without extension so in your case it would be "luffy".

& karma was removed xD

RedRobster
06-20-2010, 04:02
This has nothing to do with menus btw.

The folder should be "models" not "model".
The correct function to use is cs_set_user_model() (http://www.amxmodx.org/funcwiki.php?go=func&id=191).
I believe you reference the model by just the filename without extension so in your case it would be "luffy".

Well, when you precache it, you do use the .mdl extension.
It's only when you are doing the cs_set_user_model(id, "luffy") that you wouldn't need it.

P.S. fysiks I know you knew that, I'm just clearing it up in case anyone misunderstood. :)

Alka
06-20-2010, 04:17
Well, when you precache it, you do use the .mdl extension.
It's only when you are doing the cs_set_user_model(id, "luffy") that you wouldn't need it.

P.S. fysiks I know you knew that, I'm just clearing it up in case anyone misunderstood. :)
Can you stop acting like a Troll Master?

fysiks
06-20-2010, 13:19
Can you stop acting like a Troll Master?

How is that being a troll? He brings up a point not yet mentioned. The model must be precached.

SaM.ThE.MaN
06-20-2010, 13:44
if i use cs_set_user_model its not required to precache the model

drekes
06-20-2010, 13:57
if i use cs_set_user_model its not required to precache the model

Why not? Afaik if you use models you have to precache them, or you will crash your server with "model ... is not precached" or something like that.

Correct me if i'm wrong.

SaM.ThE.MaN
06-20-2010, 14:18
umm , i dint get anything like that , even when i had 21 players on my server O.o, i used cs_set_user_model , hannah dude/girl can we be friends -.-

fysiks
06-20-2010, 14:45
If you don't precache it nobody will have it in memory and it cannot be used (unless another plugin precached it already obviously).

drekes
06-20-2010, 15:11
If you don't precache it nobody will have it in memory and it cannot be used (unless another plugin precached it already obviously).
That was what i ment.