Raised This Month: $ Target: $400
 0% 

[RESOLVED] Replacing player models using FAKEMETA


Post New Thread Reply   
 
Thread Tools Display Modes
slmclarengt
Veteran Member
Join Date: Jul 2004
Location: The Cookie Jar... or Pul
Old 12-10-2006 , 16:01   Re: Replacing models using FAKEMETA (simple, but help plz)
Reply With Quote #11

Quote:
Originally Posted by [ --<-@ ] Black Rose View Post
Something like...
Code:
#include <amxmodx> #include <cstrike> #include <fakemeta> public plugin_init() {     register_plugin("", "", "")     register_forward(FM_SetModel,"fw_setmodel"); } public plugin_precache()     precache_model("models/player/christmas/christmas.mdl") public fw_setmodel(ent,model[]) {         if ( equal(model, "models/player/leet/leet.mdl") )         cs_set_user_model(ent, "christmas") }
Working on it. Thank you very much!!!

EDIT: This is what I am using now and it's NOT working! Downloading models but still not showing them.

Code:
#include <amxmodx> #include <cstrike> #include <fakemeta> //CREDITS: Black Rose, VEN & Avalanche public plugin_init() {     register_plugin("Christmas Model Replacement", ".1", "Slmclarengt")     register_forward(FM_SetModel,"fw_setmodel"); } public plugin_precache() {     precache_model("models/player/christmas/terror-christmas.mdl")     precache_model("models/player/christmas/arctic-christmas.mdl")     precache_model("models/player/christmas/guerilla-christmas.mdl")     precache_model("models/player/christmas/militia-christmas.mdl")     precache_model("models/player/christmas/leet-christmas.mdl") } public fw_setmodel(ent,model[]) {         if ( equal(model, "models/player/leet/leet.mdl") )         cs_set_user_model(ent, "leet-christmas")             if ( equal(model, "models/player/terror/terror.mdl") )         cs_set_user_model(ent, "terror-christmas")             if ( equal(model, "models/player/arctic/arctic.mdl") )         cs_set_user_model(ent, "arctic-christmas")         if ( equal(model, "models/player/militia/militia.mdl") )         cs_set_user_model(ent, "militia-christmas")             if ( equal(model, "models/player/guerilla/guerilla.mdl") )         cs_set_user_model(ent, "guerilla-christmas") }

Slmclarengt
__________________
But we don’t beat the Reaper by living longer. We beat the Reaper by living well. -Dr. Randy Pausch, R.I.P.

Come play WC3:FT on BnD Clan Server! You know you want to: Connect to WC3:FT BnD - go ahead click me!

Last edited by slmclarengt; 12-10-2006 at 17:02.
slmclarengt is offline
slmclarengt
Veteran Member
Join Date: Jul 2004
Location: The Cookie Jar... or Pul
Old 12-10-2006 , 17:14   Re: Replacing models using FAKEMETA (simple, but help plz)
Reply With Quote #12

It's not working because
Code:
cs_set_user_model(ent, "leet-christmas")
does not set the Model on the player, but on "ent." cs_set_user_model requires an index but I'm pretty sure ent is not the index cs_set_user_model needs.

My Question now: How do I get the ID of the person?

Ok, this is what I have now after searching numerous times (finding RedRover plugin to help):

Code:
#include <amxmodx> #include <cstrike> //set models #include <fakemeta>//check models #include <engine> //entity_get_edict //CREDITS: Black Rose, VEN & Avalanche public plugin_init() {     register_plugin("Christmas Model Replacement", ".1", "Slmclarengt")     register_forward(FM_SetModel,"fw_setmodel"); } public plugin_precache() {     precache_model("models/player/christmas/terror-christmas.mdl")     precache_model("models/player/christmas/arctic-christmas.mdl")     precache_model("models/player/christmas/guerilla-christmas.mdl")     precache_model("models/player/christmas/militia-christmas.mdl")     precache_model("models/player/christmas/leet-christmas.mdl") } public fw_setmodel(ent,model[]) {         new owner = entity_get_edict(ent,EV_ENT_owner);         if ( equal(model, "models/player/leet/leet.mdl") )         cs_set_user_model(owner, "leet-christmas")             if ( equal(model, "models/player/terror/terror.mdl") )         cs_set_user_model(owner, "terror-christmas")             if ( equal(model, "models/player/arctic/arctic.mdl") )         cs_set_user_model(owner, "arctic-christmas")         if ( equal(model, "models/player/militia/militia.mdl") )         cs_set_user_model(owner, "militia-christmas")             if ( equal(model, "models/player/guerilla/guerilla.mdl") )         cs_set_user_model(owner, "guerilla-christmas") }

Slmclarengt
__________________
But we don’t beat the Reaper by living longer. We beat the Reaper by living well. -Dr. Randy Pausch, R.I.P.

Come play WC3:FT on BnD Clan Server! You know you want to: Connect to WC3:FT BnD - go ahead click me!

Last edited by slmclarengt; 12-10-2006 at 22:40.
slmclarengt is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 12-11-2006 , 02:05   Re: Replacing player models using FAKEMETA (simple, but help plz)
Reply With Quote #13

Forgot if(equali(model,"models/w_c4.mdl")) check?
VEN is offline
dutchmeat
Senior Member
Join Date: Sep 2006
Old 12-11-2006 , 05:00   Re: Replacing player models using FAKEMETA (simple, but help plz)
Reply With Quote #14

The cs_set_user_model is wrong...
See the paths:

Code:
 cs_set_user_model(ent, "myplayermodel")
precache_model("models/player/myplayermodel/myplayermodel.mdl")


so it should be:

Code:
cs_set_user_model(ent, "terror-christmas")
precache_model("models/player/terror-christmas/terror-christmas.mdl")
__________________
before you criticize someone, you should walk a mile in their shoes. that way, when you criticize them, you're a mile away and you have their shoes.
dutchmeat is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 12-11-2006 , 11:32   Re: Replacing models using FAKEMETA (simple, but help plz)
Reply With Quote #15

Quote:
Originally Posted by slmclarengt View Post
It's not working because
Code:
cs_set_user_model(ent, "leet-christmas")
does not set the Model on the player, but on "ent." cs_set_user_model requires an index but I'm pretty sure ent is not the index cs_set_user_model needs.
ent = playerid.
I've tested it, playerIDs are 1-32.
This is just a part of the result.
As you can see all player type models have ent < 32 wich means player.
Code:
ent: 20, model: models/player.mdl
ent: 20, model: models/player.mdl
ent: 20, model: models/player/urban/urban.mdl
ent: 34, model: models/w_knife.mdl
ent: 20, model: models/player/terror/terror.mdl
ent: 34, model: models/w_knife.mdl
ent: 35, model: models/w_g3sg1.mdl
ent: 1, model: models/player.mdl
ent: 1, model: models/player.mdl
ent: 1, model: models/player/urban/urban.mdl
ent: 36, model: models/w_knife.mdl
ent: 37, model: models/w_knife.mdl
ent: 2, model: models/player.mdl
ent: 2, model: models/player.mdl
ent: 37, model: models/w_ak47.mdl
ent: 38, model: models/w_weaponbox.mdl
ent: 38, model: models/w_ak47.mdl
ent: 39, model: models/w_m4a1.mdl
ent: 40, model: models/w_kevlar.mdl
ent: 41, model: models/w_weaponbox.mdl
ent: 41, model: models/w_m4a1.mdl
ent: 42, model: models/w_m4a1.mdl
ent: 40, model: models/w_weaponbox.mdl
ent: 40, model: models/w_g3sg1.mdl
ent: 43, model: models/w_hegrenade.mdl
ent: 38, model: models/w_weaponbox.mdl
ent: 38, model: models/w_ak47.mdl
ent: 44, model: models/w_ak47.mdl
ent: 2, model: models/player/terror/terror.mdl
ent: 45, model: models/w_weaponbox.mdl
ent: 45, model: models/w_ak47.mdl
ent: 41, model: models/w_weaponbox.mdl
ent: 41, model: models/w_m4a1.mdl
ent: 45, model: models/w_weaponbox.mdl
ent: 45, model: models/w_ak47.mdl
ent: 46, model: models/w_awp.mdl
ent: 47, model: models/w_weaponbox.mdl
ent: 47, model: models/w_awp.mdl
ent: 3, model: models/player.mdl
ent: 3, model: models/player.mdl
ent: 3, model: models/player/urban/urban.mdl
ent: 45, model: models/grenade.mdl
ent: 45, model: models/w_hegrenade.mdl
ent: 43, model: models/grenade.mdl
ent: 114, model: models/grenade.mdl
ent: 115, model: models/grenade.mdl
ent: 116, model: models/w_weaponbox.mdl
ent: 116, model: models/w_ak47.mdl
ent: 34, model: models/w_knife.mdl
ent: 43, model: models/w_knife.mdl
ent: 45, model: models/w_knife.mdl
ent: 34, model: models/w_ak47.mdl
ent: 35, model: models/w_weaponbox.mdl
ent: 35, model: models/w_ak47.mdl
ent: 37, model: models/w_awp.mdl
ent: 38, model: models/w_hegrenade.mdl
ent: 39, model: models/w_kevlar.mdl
ent: 39, model: models/w_m4a1.mdl
ent: 40, model: models/w_weaponbox.mdl
ent: 40, model: models/w_m4a1.mdl
ent: 41, model: models/w_m4a1.mdl
ent: 4, model: models/player.mdl
ent: 4, model: models/player.mdl
ent: 2, model: models/player.mdl
ent: 2, model: models/player.mdl
ent: 44, model: models/w_weaponbox.mdl
ent: 44, model: models/w_m4a1.mdl
ent: 2, model: models/player/terror/terror.mdl
ent: 36, model: models/w_weaponbox.mdl
ent: 36, model: models/w_m4a1.mdl
ent: 45, model: models/w_knife.mdl
ent: 46, model: models/w_knife.mdl
ent: 47, model: models/w_knife.mdl
ent: 114, model: models/w_knife.mdl
ent: 4, model: models/player/terror/terror.mdl
ent: 34, model: models/w_knife.mdl
ent: 5, model: models/player.mdl
ent: 5, model: models/player.mdl
ent: 5, model: models/player/urban/urban.mdl
ent: 35, model: models/w_weaponbox.mdl
ent: 35, model: models/w_awp.mdl
ent: 36, model: models/w_awp.mdl
ent: 39, model: models/w_m4a1.mdl
ent: 40, model: models/w_kevlar.mdl
ent: 41, model: models/w_weaponbox.mdl
ent: 41, model: models/w_m4a1.mdl
ent: 42, model: models/w_m4a1.mdl
ent: 40, model: models/w_hegrenade.mdl
ent: 6, model: models/player.mdl
ent: 6, model: models/player.mdl
ent: 6, model: models/player/urban/urban.mdl
ent: 44, model: models/grenade.mdl
ent: 44, model: models/w_hegrenade.mdl
ent: 38, model: models/grenade.mdl
ent: 47, model: models/grenade.mdl
ent: 114, model: models/grenade.mdl
ent: 38, model: models/grenade.mdl
ent: 38, model: models/w_hegrenade.mdl
ent: 7, model: models/player.mdl
ent: 7, model: models/player.mdl
ent: 7, model: models/player/terror/terror.mdl
ent: 38, model: models/w_ak47.mdl
ent: 40, model: models/w_hegrenade.mdl
ent: 44, model: models/w_weaponbox.mdl
ent: 44, model: models/w_ak47.mdl
ent: 34, model: models/w_hegrenade.mdl
ent: 9, model: models/player.mdl
[ --<-@ ] Black Rose is offline
slmclarengt
Veteran Member
Join Date: Jul 2004
Location: The Cookie Jar... or Pul
Old 12-11-2006 , 19:28   Re: Replacing models using FAKEMETA (simple, but help plz)
Reply With Quote #16

Quote:
Originally Posted by dutchmeat View Post
The cs_set_user_model is wrong...
See the paths:

Code:
 cs_set_user_model(ent, "myplayermodel")
precache_model("models/player/myplayermodel/myplayermodel.mdl")


so it should be:

Code:
cs_set_user_model(ent, "terror-christmas")
precache_model("models/player/terror-christmas/terror-christmas.mdl")


Quote:
Originally Posted by [ --<-@ ] Black Rose View Post
ent = playerid.
I've tested it, playerIDs are 1-32.
This is just a part of the result.
As you can see all player type models have ent < 32 wich means player.
Code:
ent: 20, model: models/player.mdl
ent: 20, model: models/player.mdl
ent: 20, model: models/player/urban/urban.mdl
ent: 34, model: models/w_knife.mdl
ent: 20, model: models/player/terror/terror.mdl
ent: 34, model: models/w_knife.mdl
ent: 35, model: models/w_g3sg1.mdl
ent: 1, model: models/player.mdl
ent: 1, model: models/player.mdl
ent: 1, model: models/player/urban/urban.mdl
ent: 36, model: models/w_knife.mdl
ent: 37, model: models/w_knife.mdl
ent: 2, model: models/player.mdl
ent: 2, model: models/player.mdl
ent: 37, model: models/w_ak47.mdl
ent: 38, model: models/w_weaponbox.mdl
ent: 38, model: models/w_ak47.mdl
ent: 39, model: models/w_m4a1.mdl
ent: 40, model: models/w_kevlar.mdl
ent: 41, model: models/w_weaponbox.mdl
ent: 41, model: models/w_m4a1.mdl
ent: 42, model: models/w_m4a1.mdl
ent: 40, model: models/w_weaponbox.mdl
ent: 40, model: models/w_g3sg1.mdl
ent: 43, model: models/w_hegrenade.mdl
ent: 38, model: models/w_weaponbox.mdl
ent: 38, model: models/w_ak47.mdl
ent: 44, model: models/w_ak47.mdl
ent: 2, model: models/player/terror/terror.mdl
ent: 45, model: models/w_weaponbox.mdl
ent: 45, model: models/w_ak47.mdl
ent: 41, model: models/w_weaponbox.mdl
ent: 41, model: models/w_m4a1.mdl
ent: 45, model: models/w_weaponbox.mdl
ent: 45, model: models/w_ak47.mdl
ent: 46, model: models/w_awp.mdl
ent: 47, model: models/w_weaponbox.mdl
ent: 47, model: models/w_awp.mdl
ent: 3, model: models/player.mdl
ent: 3, model: models/player.mdl
ent: 3, model: models/player/urban/urban.mdl
ent: 45, model: models/grenade.mdl
ent: 45, model: models/w_hegrenade.mdl
ent: 43, model: models/grenade.mdl
ent: 114, model: models/grenade.mdl
ent: 115, model: models/grenade.mdl
ent: 116, model: models/w_weaponbox.mdl
ent: 116, model: models/w_ak47.mdl
ent: 34, model: models/w_knife.mdl
ent: 43, model: models/w_knife.mdl
ent: 45, model: models/w_knife.mdl
ent: 34, model: models/w_ak47.mdl
ent: 35, model: models/w_weaponbox.mdl
ent: 35, model: models/w_ak47.mdl
ent: 37, model: models/w_awp.mdl
ent: 38, model: models/w_hegrenade.mdl
ent: 39, model: models/w_kevlar.mdl
ent: 39, model: models/w_m4a1.mdl
ent: 40, model: models/w_weaponbox.mdl
ent: 40, model: models/w_m4a1.mdl
ent: 41, model: models/w_m4a1.mdl
ent: 4, model: models/player.mdl
ent: 4, model: models/player.mdl
ent: 2, model: models/player.mdl
ent: 2, model: models/player.mdl
ent: 44, model: models/w_weaponbox.mdl
ent: 44, model: models/w_m4a1.mdl
ent: 2, model: models/player/terror/terror.mdl
ent: 36, model: models/w_weaponbox.mdl
ent: 36, model: models/w_m4a1.mdl
ent: 45, model: models/w_knife.mdl
ent: 46, model: models/w_knife.mdl
ent: 47, model: models/w_knife.mdl
ent: 114, model: models/w_knife.mdl
ent: 4, model: models/player/terror/terror.mdl
ent: 34, model: models/w_knife.mdl
ent: 5, model: models/player.mdl
ent: 5, model: models/player.mdl
ent: 5, model: models/player/urban/urban.mdl
ent: 35, model: models/w_weaponbox.mdl
ent: 35, model: models/w_awp.mdl
ent: 36, model: models/w_awp.mdl
ent: 39, model: models/w_m4a1.mdl
ent: 40, model: models/w_kevlar.mdl
ent: 41, model: models/w_weaponbox.mdl
ent: 41, model: models/w_m4a1.mdl
ent: 42, model: models/w_m4a1.mdl
ent: 40, model: models/w_hegrenade.mdl
ent: 6, model: models/player.mdl
ent: 6, model: models/player.mdl
ent: 6, model: models/player/urban/urban.mdl
ent: 44, model: models/grenade.mdl
ent: 44, model: models/w_hegrenade.mdl
ent: 38, model: models/grenade.mdl
ent: 47, model: models/grenade.mdl
ent: 114, model: models/grenade.mdl
ent: 38, model: models/grenade.mdl
ent: 38, model: models/w_hegrenade.mdl
ent: 7, model: models/player.mdl
ent: 7, model: models/player.mdl
ent: 7, model: models/player/terror/terror.mdl
ent: 38, model: models/w_ak47.mdl
ent: 40, model: models/w_hegrenade.mdl
ent: 44, model: models/w_weaponbox.mdl
ent: 44, model: models/w_ak47.mdl
ent: 34, model: models/w_hegrenade.mdl
ent: 9, model: models/player.mdl
Thank you both very much!!! I don't know if it worked but dutchmeat may have found my problem!!!

Thank you dutchmeat - that simple issue was in-fact my problem! Also, thank you Black Rose, it appears that you were correct and optimized my code because I did not need the extra variable.

Slmclarengt
__________________
But we don’t beat the Reaper by living longer. We beat the Reaper by living well. -Dr. Randy Pausch, R.I.P.

Come play WC3:FT on BnD Clan Server! You know you want to: Connect to WC3:FT BnD - go ahead click me!

Last edited by slmclarengt; 12-12-2006 at 01:11.
slmclarengt is offline
dutchmeat
Senior Member
Join Date: Sep 2006
Old 12-12-2006 , 06:14   Re: [RESOLVED] Replacing player models using FAKEMETA
Reply With Quote #17

your welcome
__________________
before you criticize someone, you should walk a mile in their shoes. that way, when you criticize them, you're a mile away and you have their shoes.
dutchmeat is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 12-12-2006 , 07:03   Re: [RESOLVED] Replacing player models using FAKEMETA
Reply With Quote #18

BTW, slmclarengt, i've described to you how to use cs_set_user_model before.
Quote:
Originally Posted by VEN in PM reply to slmclarengt
precache_model("models/player/MODEL/MODEL.mdl")
cs_set_user_model(id, "MODEL")
You probably just overlooked that detail. ;]

Last edited by VEN; 12-12-2006 at 07:12.
VEN is offline
slmclarengt
Veteran Member
Join Date: Jul 2004
Location: The Cookie Jar... or Pul
Old 12-12-2006 , 21:32   Re: [RESOLVED] Replacing player models using FAKEMETA
Reply With Quote #19

Quote:
Originally Posted by VEN View Post
BTW, slmclarengt, i've described to you how to use cs_set_user_model before.You probably just overlooked that detail. ;]
You and your incredible intelligence VEN :-). Yes, I did overlook that detail. Thank you very much, too!!!

Slmclarengt
__________________
But we don’t beat the Reaper by living longer. We beat the Reaper by living well. -Dr. Randy Pausch, R.I.P.

Come play WC3:FT on BnD Clan Server! You know you want to: Connect to WC3:FT BnD - go ahead click me!
slmclarengt 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 07:00.


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