Raised This Month: $ Target: $400
 0% 

pistols only


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
JohnJ3
Member
Join Date: May 2006
Location: Tomsk
Old 06-14-2006 , 03:26  
Reply With Quote #1

ok, you can use my function:
Code:
//types of weapons  #define W_NONE 0  #define W_PRIMARY 1  #define W_SECONDARY 2  #define W_KNIFE 3  #define W_GRENADE 4  #define W_BOMB 5 get_weap_range(wp) {  if ((wp==CSW_SCOUT) || (wp==CSW_XM1014) || (wp==CSW_MAC10) || (wp==CSW_AUG) || (wp==CSW_UMP45) || (wp==CSW_SG550)      || (wp==CSW_GALIL) || (wp==CSW_FAMAS) || (wp==CSW_AWP) || (wp==CSW_MP5NAVY) || (wp==CSW_M249) || (wp==CSW_M3)      || (wp==CSW_M4A1) || (wp==CSW_TMP) || (wp==CSW_G3SG1) || (wp==CSW_SG552) || (wp==CSW_AK47) || (wp==CSW_P90))  {   return W_PRIMARY  }  else if ((wp==CSW_P228) || (wp==CSW_ELITE) || (wp==CSW_FIVESEVEN) || (wp==CSW_USP) || (wp==CSW_GLOCK18) || (wp==CSW_TMP)            || (wp==CSW_DEAGLE))  {     return W_SECONDARY  }  else if (wp==CSW_KNIFE)  {   return W_KNIFE  }  else if ((wp==CSW_HEGRENADE) || (wp==CSW_SMOKEGRENADE) || (wp==CSW_FLASHBANG))  {   return W_GRENADE  }  else if (wp==CSW_C4)  {   return W_BOMB  }  return W_NONE }
and now you can use a "CurWeapon" event:
Code:
#include <cstrike> public plugin_init() {  register_event("CurWeapon","OnChangeWeap","b") } public OnChangeWeap(id) {  new wp=read_data(2)  new weaprange=get_weap_range(wp)  if (weaprange==W_PRIMARY)  {   // now you can set ammo in 0 or strip weapon   cs_set_weapon_ammo(wp,0)   // but i do not know how you can strip weapon... but you can strip all weapons by strip_user_weapons(id) fuction (need include <fun>)  }  return PLUGIN_CONTINUE }
JohnJ3 is offline
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 07:59.


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