Raised This Month: $ Target: $400
 0% 

Weapon Constants


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 12-27-2005 , 20:49  
Reply With Quote #6

Try this:

Code:
 #include <amxmodx>  #include <amxmisc>  #include <engine>    #define SVEN_RPG 8    public plugin_init(){     register_plugin("Gun Replacement","1.0","Lord Saddler/Angel killer")     register_clcmd("say !rpg_1","rpg_on",0,"Switch to custom rpg model")     register_clcmd("say !rpg_0","rpg_off",0,"Switch to normal rpg model") }  public rpg_on(id){     if(!is_user_alive(id)){         return PLUGIN_HANDLED     }     new clip, ammo     new weap = get_user_weapon(id,clip,ammo)     if(weap == 8){  //<--- Replace with a different weapon constant to replace another weapon         entity_set_string(id, EV_SZ_viewmodel, "models/gargr/p_snarkrpg.mdl")//<--- Change the model name for different weapons           entity_set_string(id, EV_SZ_weaponmodel, "models/gargr/v_snarkrpg.mdl")//<--- Change the model name for different weapons       }     return PLUGIN_CONTINUE }  public rpg_off(id){     if(!is_user_alive(id)){         return PLUGIN_HANDLED     }     new clip, ammo     new weap = get_user_weapon(id,clip,ammo)     if(weap == 8){         entity_set_string(id, EV_SZ_viewmodel, "models/gargr/p_rpg.mdl")         entity_set_string(id, EV_SZ_weaponmodel, "models/gargr/v_rpg.mdl")     }     return PLUGIN_CONTINUE }  public plugin_precache(){     precache_model("models/gargr/p_snarkrpg.mdl")     precache_model("models/gargr/v_snarkrpg.mdl")     precache_model("models/gargr/p_rpg.mdl")     precache_model("models/gargr/v_rpg.mdl") }
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
 



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 15:58.


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