Raised This Month: $ Target: $400
 0% 

model change


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Cypher-Marx
Junior Member
Join Date: Dec 2008
Old 12-27-2008 , 00:38   model change
Reply With Quote #1

How do I force a player to change his model with out using console commands? Any ideas? BTW The way this mod is not for CS 1.6 its for a mod called TS... I'm just wondering if there is any way to code it with out using console commands...
Cypher-Marx is offline
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 12-27-2008 , 05:38   Re: model change
Reply With Quote #2

Change weapon model (search) or weapon ?
__________________

anakin_cstrike is offline
Cypher-Marx
Junior Member
Join Date: Dec 2008
Old 12-27-2008 , 17:03   Re: model change
Reply With Quote #3

Quote:
Originally Posted by anakin_cstrike View Post
Change weapon model (search) or weapon ?
The players model, not a weapon at all.
Cypher-Marx is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 12-27-2008 , 17:44   Re: model change
Reply With Quote #4

Search.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Cypher-Marx
Junior Member
Join Date: Dec 2008
Old 12-27-2008 , 18:07   Re: model change
Reply With Quote #5

Quote:
Originally Posted by Exolent[jNr] View Post
... I did they only have Cstrike mods and i don't code for that game... So once again can someone please help me with this?

Anyone know why "entity_set_model(playerID, "models/model.mdl")" won't work?

Last edited by Cypher-Marx; 12-27-2008 at 18:15.
Cypher-Marx is offline
Dores
Veteran Member
Join Date: Jun 2008
Location: You really don't wanna k
Old 12-27-2008 , 19:20   Re: model change
Reply With Quote #6

Quote:
Originally Posted by Cypher-Marx View Post
... I did they only have Cstrike mods and i don't code for that game... So once again can someone please help me with this?

Anyone know why "entity_set_model(playerID, "models/model.mdl")" won't work?
The player's model must be in a folder with the exact name as the model. I.e:
PHP Code:
entity_set_modelplayerID"models/player/custom_model/custom_model.mdl" ); 
EDIT: Oh wait, I'm not sure if it's for TS as well... Might be only for CS, but still give it a try.
__________________
O o
/Ż________________________
| IMMA FIRIN' MAH LAZOR!!!
\_ŻŻŻ
Dores is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 12-27-2008 , 19:39   Re: model change
Reply With Quote #7

Since you can't use cs_set_user_model(), try this:
Code:
stock fm_set_user_model(client, const model[]) {     return engfunc(EngFunc_SetClientKeyValue, client, engfunc(EngFunc_GetInfoKeyBuffer, client), "model", model); }

Usage:
Code:
#include <amxmodx> #include <amxmisc> #include <fakemeta> public plugin_precache() {     precache_model("models/player/newmodel/newmodel.mdl"); } public myfunction(client) {     fm_set_user_model(client, "newmodel"); } stock fm_set_user_model(client, const model[]) {     return engfunc(EngFunc_SetClientKeyValue, client, engfunc(EngFunc_GetInfoKeyBuffer, client), "model", model); }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Cypher-Marx
Junior Member
Join Date: Dec 2008
Old 12-27-2008 , 22:38   Re: model change
Reply With Quote #8

Quote:
Originally Posted by Exolent[jNr] View Post
Since you can't use cs_set_user_model(), try this: Code:
stock fm_set_user_model(client, const model[]) { return engfunc(EngFunc_SetClientKeyValue, client, engfunc(EngFunc_GetInfoKeyBuffer, client), "model", model); }


Usage: Code:
#include <amxmodx> #include <amxmisc> #include <fakemeta> public plugin_precache() { precache_model("models/player/newmodel/newmodel.mdl"); } public myfunction(client) { fm_set_user_model(client, "newmodel"); } stock fm_set_user_model(client, const model[]) { return engfunc(EngFunc_SetClientKeyValue, client, engfunc(EngFunc_GetInfoKeyBuffer, client), "model", model); }
This works on free for all but in team games it changes your model right back to what its supposed to be... Anyway to get around this? and +karma to all who helped so far .
Cypher-Marx is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 12-28-2008 , 19:48   Re: model change
Reply With Quote #9

Quote:
Originally Posted by Exolent[jNr] View Post
Since you can't use cs_set_user_model(), try this:
Code:
stock fm_set_user_model(client, const model[]) {     return engfunc(EngFunc_SetClientKeyValue, client, engfunc(EngFunc_GetInfoKeyBuffer, client), "model", model); }

Usage:
Code:
#include <amxmodx> #include <amxmisc> #include <fakemeta> public plugin_precache() {     precache_model("models/player/newmodel/newmodel.mdl"); } public myfunction(client) {     fm_set_user_model(client, "newmodel"); } stock fm_set_user_model(client, const model[]) {     return engfunc(EngFunc_SetClientKeyValue, client, engfunc(EngFunc_GetInfoKeyBuffer, client), "model", model); }
Why are you so obsessed with FM? You could shorten that code by a good 90% using this:

Code:
set_user_info(id,"model",model[])

Also, you can catch (using FM) when the player's model is set and block that. The hook would be:

Code:
register_forward(FM_SetModel,"ForwardSetModel")

In ForwardSetModel (or whatever you change it to), just return the value FMRES_SUPERCEDE.
__________________

Last edited by Hawk552; 12-28-2008 at 19:50.
Hawk552 is offline
Send a message via AIM to Hawk552
Cypher-Marx
Junior Member
Join Date: Dec 2008
Old 12-30-2008 , 04:38   Re: model change
Reply With Quote #10

Hawk that really doesn't help me in this case... Its a TS:Team server. This means that client console commands don't work for this one. I want to make it so I can force change someones model without TS changing it back to the models i wrote in my CFG. Can you help with that?
Cypher-Marx 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 09:08.


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