AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   help!HOW to change a player's model by amx1.8? (https://forums.alliedmods.net/showthread.php?t=65411)

kof2000k 01-07-2008 20:55

help!HOW to change a player's model by amx1.8?
 
"entity_set_model" is no effect, who can help me?Thanks a lot.

Exolent[jNr] 01-07-2008 21:59

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

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

public plugin_precache()
{
    precache_model(g_ModelName);
}

// [...]

cs_set_user_model(index, g_ModelName);


kof2000k 01-07-2008 22:08

Re: help!HOW to change a player's model by amx1.8?
 
sorry,I don't know if i #include <cstrike> ,the clcmd would no effect,but why entity_set_model is unefficient...

hlstriker 01-07-2008 22:19

Re: help!HOW to change a player's model by amx1.8?
 
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.

kof2000k 01-07-2008 22:27

Re: help!HOW to change a player's model by amx1.8?
 
where can I study how add cstrike modules?

hlstriker 01-07-2008 22:31

Re: help!HOW to change a player's model by amx1.8?
 
Just add the line...
#include <cstrike>
... to the top of your plugin near the other #includes

kof2000k 01-07-2008 22:37

Re: help!HOW to change a player's model by amx1.8?
 
But,when I add #include <cstrike>,my register_clcmd would be no effect...
Help, is my examination of my boss employing me.

hlstriker 01-07-2008 23:19

Re: help!HOW to change a player's model by amx1.8?
 
Don't remove the old includes, just add that new one.

kof2000k 01-07-2008 23:50

Re: help!HOW to change a player's model by amx1.8?
 
Well,I have succeeded,I download the cstrike version and then succeeded...Thank you!


All times are GMT -4. The time now is 11:12.

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