AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   pistols only (https://forums.alliedmods.net/showthread.php?t=29817)

Z@C 06-13-2006 09:02

pistols only
 
sorry for this post,but i can't make that plugin and i don't know where i must write this post.
get me this plugin,plz

Mik3h 06-13-2006 09:08

You don't need to write this post.
You need to learn how to use

http://www.amxmodx.org/forums/templa...ini_search.gif SEARCH

Z@C 06-13-2006 15:05

i was used SEARCH but not found.
i search,for example,weapon arena. this plugin not needed me

JohnJ3 06-13-2006 16:21

may be http://forums.alliedmods.net/showthread.php?p=3426

Z@C 06-13-2006 16:37

not.
i need is OFF primary weapons.
pistols must buy in default option and not get in start round

Rolnaaba 06-13-2006 17:10

no need for a plugin, just use admin to restrict all weapons you dont want (rifles)

Z@C 06-13-2006 17:18

... how make this without restrict?

ps: where i can read weapon ID (not CSW_) #-number
example,hegrenade - 4

JohnJ3 06-14-2006 03:26

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 }


All times are GMT -4. The time now is 07:59.

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