Raised This Month: $ Target: $400
 0% 

help!HOW to change a player's model by amx1.8?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kof2000k
Junior Member
Join Date: Jan 2008
Old 01-07-2008 , 20:55   help!HOW to change a player's model by amx1.8?
Reply With Quote #1

"entity_set_model" is no effect, who can help me?Thanks a lot.
kof2000k is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-07-2008 , 21:59   Re: help!HOW to change a player's model by amx1.8?
Reply With Quote #2

Code:
new const g_ModelName[] = "models/player/modelname/modelname.mdl";

public plugin_precache()
{
     precache_model(g_ModelName);
}

// [...]

cs_set_user_model(index, g_ModelName);
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
kof2000k
Junior Member
Join Date: Jan 2008
Old 01-07-2008 , 22:08   Re: help!HOW to change a player's model by amx1.8?
Reply With Quote #3

sorry,I don't know if i #include <cstrike> ,the clcmd would no effect,but why entity_set_model is unefficient...

Last edited by kof2000k; 01-07-2008 at 22:17.
kof2000k is offline
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 01-07-2008 , 22:19   Re: help!HOW to change a player's model by amx1.8?
Reply With Quote #4

For Counter-Strike the easiest way is to add the cstrike module and use the method X-olent posted. The reason being is entity_set_model does not work for player models. It is for map and plugin created entities.
hlstriker is offline
kof2000k
Junior Member
Join Date: Jan 2008
Old 01-07-2008 , 22:27   Re: help!HOW to change a player's model by amx1.8?
Reply With Quote #5

where can I study how add cstrike modules?
kof2000k is offline
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 01-07-2008 , 22:31   Re: help!HOW to change a player's model by amx1.8?
Reply With Quote #6

Just add the line...
#include <cstrike>
... to the top of your plugin near the other #includes
hlstriker is offline
kof2000k
Junior Member
Join Date: Jan 2008
Old 01-07-2008 , 22:37   Re: help!HOW to change a player's model by amx1.8?
Reply With Quote #7

But,when I add #include <cstrike>,my register_clcmd would be no effect...
Help, is my examination of my boss employing me.

Last edited by kof2000k; 01-07-2008 at 22:48.
kof2000k is offline
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 01-07-2008 , 23:19   Re: help!HOW to change a player's model by amx1.8?
Reply With Quote #8

Don't remove the old includes, just add that new one.
hlstriker is offline
kof2000k
Junior Member
Join Date: Jan 2008
Old 01-07-2008 , 23:50   Re: help!HOW to change a player's model by amx1.8?
Reply With Quote #9

Well,I have succeeded,I download the cstrike version and then succeeded...Thank you!
kof2000k is offline
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 11:12.


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