|
發表於 15-4-2009 23:05:53
|
顯示全部樓層
- /* Buy Unlimited ammo for one round!
- Idea and 50% of the plugin by: Noizza
- thx to nightscreem for his help cause this is my first plugin...
- He mades it possible to end the effect @ the end of the round!
- but it wont run without Fox-NL... he made the plugin standalone so
- that no superheromod is needed!
- MODULES:
- you will need the engine and the cstrike module to run this plugin!
- */
-
- #include <amxmodx>
- #include <amxmisc>
- #include <cstrike>
- #include <engine>
- public plugin_init() {
- register_plugin("buyuammo","0.1","Noizza")
- register_event("CurWeapon","check_weapon","be","1=1")
- }
- public check_weapon(id) {
- new wpnid = read_data(2)
- new clip = read_data(3)
- if(wpnid==CSW_C4||wpnid==CSW_KNIFE||wpnid==CSW_HEGRENADE||wpnid==CSW_SMOKEGRENADE||wpnid==CSW_FLASHBANG) return
- if(clip==0) {
- new wpnname[32]
- get_weaponname(wpnid,wpnname,31)
- new wpn = -1
- while((wpn=find_ent_by_class(wpnid,wpnname))!=0) {
- if(id==entity_get_edict(wpn,EV_ENT_owner)) {
- cs_set_weapon_ammo(wpn,maxclip(wpnid))
- break
- }
- }
- }
- }
- stock maxclip(wpnid) {
- new ca = 0
- switch (wpnid) {
- case CSW_P228 : ca = 13
- case CSW_SCOUT : ca = 10
- case CSW_HEGRENADE : ca = 0
- case CSW_XM1014 : ca = 7
- case CSW_C4 : ca = 0
- case CSW_MAC10 : ca = 30
- case CSW_AUG : ca = 30
- case CSW_SMOKEGRENADE : ca = 0
- case CSW_ELITE : ca = 15
- case CSW_FIVESEVEN : ca = 20
- case CSW_UMP45 : ca = 25
- case CSW_SG550 : ca = 30
- case CSW_GALI : ca = 35
- case CSW_FAMAS : ca = 25
- case CSW_USP : ca = 12
- case CSW_GLOCK18 : ca = 20
- case CSW_AWP : ca = 10
- case CSW_MP5NAVY : ca = 30
- case CSW_M249 : ca = 100
- case CSW_M3 : ca = 8
- case CSW_M4A1 : ca = 30
- case CSW_TMP : ca = 30
- case CSW_G3SG1 : ca = 20
- case CSW_FLASHBANG : ca = 0
- case CSW_DEAGLE : ca = 7
- case CSW_SG552 : ca = 30
- case CSW_AK47 : ca = 30
- }
- return ca
- }
複製代碼 |
|