Day of Defeat Plugins Community
This site is an archive — everything is readable and downloadable, nothing can be posted. Admin
Archive › Old Forum Threads › General › Chat › Custom weapon / player models, how to change them!
3 posts, 2 people · 6,245 views Thread Rating: ★★★★★
closedCustom weapon / player models, how to change them!
Started by Tank on 04-28-2010, 03:11 AM
Tank
started this thread
Posts: 581
Threads: 59
Joined: Jan 2007
04-28-2010, 03:11 AM #1

Recently I saw a few posts up on how to change the player models and the weapon models on a server. Since there were a few, I believe by MosDod and {RSR}Crazyhorse_cdn I was too lazy to look them up and post it in there, however since I was curious if we ever created something for it or that we kept referring to something which doesn't excist I did a small search on it and this is what I came up with.nnFor custom player models:nnZor's Admin Modelsnhttps://www.dodplugins.net/forums/showthread.php?t=5nnA thread about a simpler Admin ModelsnThis is perhaps easier to create something to fit your needsnhttps://www.dodplugins.net/forums/showthread.php?t=1020&highlight=modelsnnFor custom weapon models:nnI did not test this, but looks promisingnhttp://forums.alliedmods.net/showthread.php?p=374055nnSomebody please test the above posted model to change custom weapon models. If that doesn't work perhaps one of the developers can use the following pieces of code taken from dod_ninja (found here: https://www.dodplugins.net/forums/showthread.php?t=51&highlight=models). From what I see this is the stuff needed:nn

n//=========================================================n// Plugin Initializationn//=========================================================npublic plugin_init()n{n    register_plugin("Tank's ????",VERSION,"The Tank")n    register_cvar("tanks_?????",SVERSION,FCVAR_SERVER|FCVAR_SPONLY)n    n    register_event("CurWeapon", "check_weapon","be")n    n    p_enable = register_cvar("model_changer","1")n}nnpublic plugin_precache() n{ n    precache_model("models/Katana.mdl") n    precache_model("models/p_katana.mdl")n    return PLUGIN_CONTINUE n} nnpublic check_weapon(id)n{n    new clip, ammo, wpnid = dod_get_user_weapon(id,clip,ammo) n    if (wpnid == DODW_SPADE || wpnid == DODW_AMERKNIFE) n    { n        entity_set_string(id, EV_SZ_viewmodel, "models/Katana.mdl") n        entity_set_string(id, EV_SZ_weaponmodel, "models/p_katana.mdl")n    } n}n
nnBefore people start, the above posted wont work. However may give developers a slight heads up if anyone feel like creating something basic if the above posted plugin to change custom weapon models don't work.

Dr.G
posted here
Posts: 776
Threads: 75
Joined: Nov 2007
04-30-2010, 03:19 PM #2

That was fast made Tank, too fast =)rnrn->rnrn

#include <amxmodx>rn#include <dodx>rn#include <engine>rnrnnew const PLUGIN[] = "Tank's Model thingy"rnnew const VERSION[] = "v1.0"rnnew const AUTHOR[] = "Tank"rnrnnew p_enablernrnpublic plugin_init()rn{rn	register_plugin(PLUGIN, VERSION, AUTHOR)rn	register_cvar("tanks_mdl_thing", VERSION, FCVAR_SERVER|FCVAR_SPONLY)rn	rn	register_event("CurWeapon", "check_weapon","be")rn	rn	p_enable = register_cvar("model_changer","1")rn}rnrnpublic plugin_precache() rn{ rn	precache_model("models/Katana.mdl") rn	precache_model("models/p_katana.mdl")rn	return PLUGIN_CONTINUE rn} rnrnpublic check_weapon(id)rn{rn	if(!get_pcvar_num(p_enable))rn		return PLUGIN_CONTINUErn	rn	new wpnid = dod_get_user_weapon(id) rn	rn	if (wpnid == DODW_SPADE || wpnid == DODW_AMERKNIFE) rn	{ rn		entity_set_string(id, EV_SZ_viewmodel, "models/Katana.mdl") rn		entity_set_string(id, EV_SZ_weaponmodel, "models/p_katana.mdl")rn	} rn	return PLUGIN_CONTINUErn}
Tank
started this thread
Posts: 581
Threads: 59
Joined: Jan 2007
04-30-2010, 04:29 PM #3
Before people start, the above posted wont work.
nnIt's just a few pieces of code, it's not developed to work

Archive › Old Forum Threads › General › Chat › Custom weapon / player models, how to change them!
DoD Plugins Archive · Repository · Old Forum Threads · Maps · Admin · built 14 Sep 2026 00:34 UTC