Raised This Month: $ Target: $400
 0% 

REPLACE MODEL HELP


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
angel killer
Senior Member
Join Date: Oct 2005
Location: Califronia
Old 11-23-2005 , 00:55   REPLACE MODEL HELP
Reply With Quote #1

ok so i was working on this plugin to replace weapons in my server and i got the models to precache but in game were the modle should be there is nothing here is the code

Quote:
Weapon Constants:

CSW_P228
CSW_SCOUT
CSW_HEGRENADE
CSW_XM1014
CSW_C4
CSW_MAC10
CSW_AUG
CSW_SMOKEGRENADE
CSW_ELITE
CSW_FIVESEVEN
CSW_UMP45
CSW_SG550
CSW_GALI
CSW_GALIL
CSW_FAMAS
CSW_USP
CSW_GLOCK18
CSW_AWP
CSW_MP5NAVY
CSW_M249
CSW_M3
CSW_M4A1
CSW_TMP
CSW_G3SG1
CSW_FLASHBANG
CSW_DEAGLE
CSW_SG552
CSW_AK47
CSW_KNIFE
CSW_P90
*/

#include <amxmodx>
#include <amxmisc>
#include <engine>

public plugin_init()
{
register_plugin("Gun Replacement","1.0","Lord Saddler/Angel killer");
register_event("CurWeapon","handle_gun","be", "1=1");
}

public handle_gun(id)
{
if(!is_user_alive(id))
{
return 0
}

new clip, ammo
new weap = get_user_weapon(id,clip,ammo)
if(weap == CSW_DEAGLE)//<--- Replace with a different weapon constant to replace another weapon
{
entity_set_model (id, EV_SZ_viewmodel, "models/p_shield_deagle_2.mdl")//<--- Change the model name for different weapons
entity_set_model (id, EV_SZ_weaponmodel, "models/v_shield_deagle_2.mdl")//<--- Change the model name for different weapons
}

return 0
}


public plugin_precache()
{
precache_model("models/p_shield_deagle_2.mdl");
precache_model("models/v_shield_deagle_2.mdl");
}
angel killer is offline
Send a message via AIM to angel killer
uTg | bigpapajiggs
Senior Member
Join Date: Sep 2005
Location: Bellingham, WA
Old 11-23-2005 , 01:01  
Reply With Quote #2

Add #include <cstrike> under #include <engine>

lol
__________________
What's my confidence level? I do crossword puzzles with a pen.
uTg | bigpapajiggs is offline
Send a message via AIM to uTg | bigpapajiggs Send a message via MSN to uTg | bigpapajiggs Send a message via Yahoo to uTg | bigpapajiggs
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 11-23-2005 , 01:15  
Reply With Quote #3

You have viewmodel and weaponmodel reversed.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
angel killer
Senior Member
Join Date: Oct 2005
Location: Califronia
Old 11-23-2005 , 01:21  
Reply With Quote #4

what do you meen ?
angel killer is offline
Send a message via AIM to angel killer
angel killer
Senior Member
Join Date: Oct 2005
Location: Califronia
Old 11-23-2005 , 01:26  
Reply With Quote #5

omg omg it worked
thank you so much
angel killer is offline
Send a message via AIM to angel killer
Liquidz
Senior Member
Join Date: Jan 2006
Location: Toronto, Canada
Old 05-23-2006 , 23:30  
Reply With Quote #6

so what u did was a new model for all the weapons?

if so how the hell did u do that

i have been looking for some time.
__________________

Liquidz is offline
Send a message via MSN to Liquidz
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 05-24-2006 , 00:23  
Reply With Quote #7

I have one made. Replaces all weapon models, configurable through ini file. It replaces v_ , p_ , and w_ models.

It's not a free plugin you must talk to me privately for it.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
KCE
Senior Member
Join Date: Jan 2005
Location: Los Angeles, CA
Old 05-24-2006 , 02:00  
Reply With Quote #8

I think this is what you're looking for; just needs to be ported to amxmodx:
http://djeyl.net/forum/index.php?showtopic=42303

Someone tried to port it but didn't quite finish it:
http://forums.alliedmods.net/showthread.php?t=15955

Just a warning if you plan on doing this: you should have fastdl or else it will take forever, and I mean forever to download the weapon models for the client. The more models you use the more the client has to download. Weapon models can get large to download when you have to download v, p, and w models.
KCE is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 05-24-2006 , 02:13  
Reply With Quote #9

If you port it and try and release it you need permission from KRoT@L first
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
Lord_Destros
Veteran Member
Join Date: Jul 2004
Location: With stupid.
Old 05-24-2006 , 02:57  
Reply With Quote #10

There are quite a few plugins that auto change models............If your only looking for vmodels the one I ported isn't TOO bad (easy to configure). I tried porting Krotals change models but failed miserably. I may try again sometime in the future.
__________________
Quote:
Originally Posted by Twilight Suzuka
Don't worry m'lord. The turtles day will come.
Lord_Destros is offline
Send a message via AIM to Lord_Destros
Reply


Thread Tools
Display Modes

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 23:02.


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