Raised This Month: $ Target: $400
 0% 

Custom weapon models


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Author Message
M4Maniac
Member
Join Date: Aug 2005
Old 03-24-2006 , 18:25  
#1

Okay i will tell you what i just did:
Code:
#include <amxmodx> #include <engine> // this plugin requires Engine public plugin_init() { register_plugin("oh hello" , "1.0" , "v3x"); register_event("CurWeapon" , "set_models" , "be" , "1=1"); // if we don't check for the isActive parameter then the skins will act up and change unexpectedly on you (if 0) } public plugin_precache() { precache_model("models/v_glock18.mdl"); // the view model precache_model("models/p_glock18.mdl"); // the player (view) model } public set_models(id) { if(!is_user_alive(id)) // if the player is dead for some reason, prevent the rest of the function from being executed { return PLUGIN_HANDLED; } new clip, ammo, weapid = get_user_weapon(id, clip, ammo); switch(weapid) { case CSW_DEAGLE: // check if it's the weapon ID we want (see below for weapon constants) { entity_set_string(id , EV_SZ_viewmodel , "models/v_glcok18.mdl"); // set the view model entity_set_string(id , EV_SZ_weaponmodel , "models/p_glcok18.mdl"); // set the player (view) model } } return PLUGIN_CONTINUE; }

1) I took the files i dled and i put my p_glock18, v_glock18, and w_glock18 in the Models folder.

2) I took the plugin and placed it in my plugins folder

3) i edited the plugins.ini
M4Maniac is offline
Closed Thread



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 16:45.


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