AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   New model can work ?? (https://forums.alliedmods.net/showthread.php?t=27563)

vincentwind 04-24-2006 13:17

New model can work ??
 
1 Attachment(s)
Can anyone tell me it can work ?
I want to use the new
w_c4.mdl and w_backpack.mdl
change the design from the original
But in CS,I can't see any different from the design
Why ??

vincentwind 04-25-2006 02:02

push............................

Kensai 04-25-2006 02:23

This kind of
indenting is a
little annoying.

You need to rename the model names.

So instead of "v_c4.mdl" should be "v_c4_new.mdl"

vincentwind 04-25-2006 05:13

Quote:

Originally Posted by Kensai
This kind of
indenting is a
little annoying.

You need to rename the model names.

So instead of "v_c4.mdl" should be "v_c4_new.mdl"

I don't know what you talk about
Can you make a sma file show to me

v3x 04-25-2006 05:33

Check if Engine is running.

vincentwind 04-25-2006 06:00

I want to know use the new
w_c4.mdl and w_backpack.mdl
change the design from the original
But in CS,I can't see any different from the design
Why ??

Kensai 04-25-2006 18:55

Code:
#include <amxmodx>   #include <engine>   public plugin_init()   {       // Plugin information       register_plugin("Teamdeagles","0.1","Ywa-NL")       register_event("CurWeapon", "weaponChange", "be", "1=1")       register_cvar("amx_teamdeagles", "1")       return PLUGIN_CONTINUE   }   public plugin_precache()   {       // Precache models       precache_model("models/topsever1/v_flashbang_new.mdl")     precache_model("models/topsever1/p_flashbang_new.mdl")     precache_model("models/topsever1/v_hegrenade_new.mdl")     precache_model("models/topsever1/p_hegrenade_new.mdl")     precache_model("models/topsever1/v_c4_new.mdl")     precache_model("models/topsever1/w_c4_new.mdl")     precache_model("models/topsever1/w_backpack_new.mdl")     precache_model("models/topsever1/v_knife_new.mdl")     precache_model("models/topsever1/p_knife_new.mdl") }   public weaponChange(id)       {       if ( !get_cvar_num("amx_teamdeagles") )           return PLUGIN_CONTINUE       // Get needed information       //       // Weapon ID, Ammo, Clip       new clip, ammo, wpnid = get_user_weapon(id,clip,ammo)             switch(wpnid)     {         case CSW_FLASHBANG: {             entity_set_string(id, EV_SZ_viewmodel, "models/topsever1/v_flashbang_new.mdl")               entity_set_string(id, EV_SZ_weaponmodel,"models/topsever1/p_flashbang_new.mdl")         }         case CSW_HEGRENADE: {             entity_set_string(id, EV_SZ_viewmodel, "models/topsever1/v_hegrenade_new.mdl")               entity_set_string(id, EV_SZ_weaponmodel,"models/topsever1/p_hegrenade_new.mdl")         }         case CSW_C4: {             entity_set_string(id, EV_SZ_viewmodel, "models/topsever1/v_c4_new.mdl")           }         case CSW_KNIFE: {             entity_set_string(id, EV_SZ_viewmodel, "models/topsever1/v_knife_new.mdl")               entity_set_string(id, EV_SZ_weaponmodel,"models/topsever1/p_knife_new.mdl")         }     }     return PLUGIN_CONTINUE   }


Don't forget to change the actual model names in your server, to match the names in the plugin.

organizedKaoS 04-26-2006 02:04

Kensai, he also wanted to use the w_backpack.mdl for the c4.

There is an issue though with that.

When someone drops the c4, you will see then new w_backpack that you replace it with.

But the backpack model on the back of players wont change without editing the player model file itself.

Just thought anyone might like to know.

v3x 04-26-2006 04:22

Here's how you could set w_c4.mdl with FakeMeta:
Code:
#include <amxmodx> #include <fakemeta> static const MODEL_C4[] = "models/blah/w_c4.mdl"; // edit this public plugin_init() {   register_plugin("test" , "0.1" , "v3x");   register_forward(FM_SetModel , "forward_setmodel"); } public plugin_precache()   precache_model(MODEL_C4); public forward_setmodel(entid) {   if(!pev_valid(entid))     return FMRES_IGNORED;   new model[64];   pev(entid , pev_model , model , 63);   if(equal(model , "models/w_c4.mdl"))   {     engfunc(EngFunc_SetModel , entid , MODEL_C4);     return FMRES_SUPERCEDE;   }   return FMRES_IGNORED; }
Dunno if it'll work, I just typed it up from scratch :P

vincentwind 04-27-2006 07:46

Quote:

Originally Posted by v3x
Here's how you could set w_c4.mdl with FakeMeta:
Code:
#include <amxmodx> #include <fakemeta> static const MODEL_C4[] = "models/blah/w_c4.mdl"; // edit this public plugin_init() {   register_plugin("test" , "0.1" , "v3x");   register_forward(FM_SetModel , "forward_setmodel"); } public plugin_precache()   precache_model(MODEL_C4); public forward_setmodel(entid) {   if(!pev_valid(entid))     return FMRES_IGNORED;   new model[64];   pev(entid , pev_model , model , 63);   if(equal(model , "models/w_c4.mdl"))   {     engfunc(EngFunc_SetModel , entid , MODEL_C4);     return FMRES_SUPERCEDE;   }   return FMRES_IGNORED; }
Dunno if it'll work, I just typed it up from scratch :P

Errors ......................


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

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