AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   vip clothes (https://forums.alliedmods.net/showthread.php?t=187671)

yamin 06-16-2012 10:30

vip clothes
 
how can i set vip clothes to a player?

ConnorMcLeod 06-16-2012 11:31

Re: vip clothes
 
Same way you would give a player any other clothes, just set "vip" model on him.

yamin 06-16-2012 14:34

Re: vip clothes
 
code?
this?
PHP Code:

new const g_Model1[]="models/player/vip.mdl"
cs_set_user_model(idg_Model1); 


ConnorMcLeod 06-16-2012 14:46

Re: vip clothes
 
"models/player/vip.mdl" doesn't exist.

Correct path is : "models/player/vip/vip.mdl"

But correct way to use cs_set_user_model is : cs_set_user_model(id, "vip")

but cs_set_user_model is known to be buggy when used on player where there is more than 16 players, let's search for alternative ways on the forum.

yamin 06-16-2012 15:13

Re: vip clothes
 
should i add this:new const g_Model1[]="models/player/vip/vip.mdl" for cs_set_user_model

YamiKaitou 06-16-2012 15:16

Re: vip clothes
 
cs_set_user_model only takes the model's name, not filepath. You precache the filepath but use the model name to set it.

precache_model("models/player/vip/vip.mdl");
cs_set_user_model(id, "vip");

yamin 06-17-2012 05:10

Re: vip clothes
 
thanks

Waleed 06-17-2012 05:58

Re: vip clothes
 
Use this simply for VIP model
PHP Code:

cs_set_user_model(id"vip"


hornet 06-17-2012 07:38

Re: vip clothes
 
Quote:

Originally Posted by Waleed (Post 1730337)
Use this simply for VIP model
PHP Code:

cs_set_user_model(id"vip"


It's not recommended - see Connor's post.

Waleed 06-17-2012 07:38

Re: vip clothes
 
Hey there,
What does precache do??
Do I need to precache my model so Clients will download that model when connecting to my server?
Where to use precache,Above plugin_init,Or before using that model?


All times are GMT -4. The time now is 06:05.

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