Raised This Month: $ Target: $400
 0% 

Custom Weapon Drop & Pickup


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 06-04-2013 , 18:53   Custom Weapon Drop & Pickup
Reply With Quote #1

im trying to make it so if you have a custom gun and you drop it or you die the custom model shows on floor and also when picked up that player gets the custom weapon..

this is my code so far.. but i have NO idea howto even start... if someone could point me in the right direction id be very thankful..

Code:
#include <amxmodx> #include <amxmisc> #include <fakemeta> #define PLUGIN "Golden Weapons" #define VERSION "1.0" #define AUTHOR "Blizzard" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         register_event("CurWeapon","event_curweapon","be", "1=1");     } public plugin_precache() {         precache_model("models/golden/v_ak47.mdl");     precache_model("models/golden/p_ak47.mdl");     precache_model("models/golden/v_m4a1.mdl");     precache_model("models/golden/p_m4a1.mdl");     precache_model("models/golden/v_deagle.mdl");     precache_model("models/golden/p_deagle.mdl"); } public event_curweapon(id) {     new clip, ammo, weapon = get_user_weapon(id, clip, ammo);         if(weapon == CSW_AK47) {         set_pev(id, pev_viewmodel2, "models/golden/v_ak47.mdl");         set_pev(id, pev_weaponmodel2, "models/golden/p_ak47.mdl");                 if(pev(id, pev_button) & IN_ATTACK) {             set_pev(id, pev_punchangle, Float:{0.0, 0.0, 0.0});         }     }     if(weapon == CSW_M4A1) {         set_pev(id, pev_viewmodel2, "models/golden/v_m4a1.mdl");         set_pev(id, pev_weaponmodel2, "models/golden/p_m4a1.mdl");                 if(pev(id, pev_button) & IN_ATTACK)  {               set_pev(id, pev_punchangle, Float:{0.0, 0.0, 0.0});         }     }     if(weapon == CSW_DEAGLE) {         set_pev(id, pev_viewmodel2, "models/golden/v_deagle.mdl");         set_pev(id, pev_weaponmodel2, "models/golden/p_deagle.mdl");                 if(pev(id, pev_button) & IN_ATTACK) {               set_pev(id, pev_punchangle, Float:{0.0, 0.0, 0.0});         }     }     return PLUGIN_CONTINUE; }

i do have the w_ models also ...
__________________

Last edited by Blizzard_87; 06-04-2013 at 18:55.
Blizzard_87 is offline
 



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:27.


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