Raised This Month: $ Target: $400
 0% 

models


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hmrsmpsn
Senior Member
Join Date: Nov 2005
Location: sWeDeN YEEAAAH!!!
Old 06-25-2006 , 21:35   models
Reply With Quote #1

im trying to make a model changer for cs andi want the plugin to change the model for the machinegun. i need help on how to do this!
hmrsmpsn is offline
k007
BANNED
Join Date: Mar 2006
Location: bacon?
Old 06-25-2006 , 22:42   Re: models
Reply With Quote #2

Code:
#include <amxmodx> #include <engine> #include <fun> new M249_MODEL_NAME[64] = "models/model name.mdl" //your model DIR public plugin_init(){     register_plugin("machine gun","0.1","k007")     register_event("WeapPickup","checkModel","b","1=19")          register_event("CurWeapon","checkWeapon","be","1=1")     } public plugin_precache(){     precache_model(M249_MODEL_NAME)     return PLUGIN_CONTINUE } public checkModel(id){     if (!is_user_alive(id)){         return PLUGIN_CONTINUE     }     entity_set_string(id, EV_SZ_viewmodel, M249_MODEL_NAME)             new iCurrent     iCurrent = find_ent_by_class(-1,"weapon_M249")     while(iCurrent != 0) {         iCurrent = find_ent_by_class(iCurrent,"weapon_M249")     }     return PLUGIN_HANDLED } public checkWeapon(id){     new plrClip, plrAmmo, plrWeap[32]     new plrWeapId     plrWeapId = get_user_weapon(id, plrClip, plrAmmo)         if (plrWeapId == CSW_M249){         checkModel(id)     }     else {                 return PLUGIN_CONTINUE     }     return PLUGIN_CONTINUE }
k007 is offline
Send a message via MSN to k007
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 08:04.


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