搜索
查看: 7375|回复: 20

如何禁止特定的图购买手雷等(已经解决)

[复制链接]
发表于 2005-12-17 13:31:03 | 显示全部楼层 |阅读模式 来自 中国–广东–深圳–宝安区
在网上发现过有一些服务器弄的不错,像bloodstrike,  默认就禁止买各种雷, awpccc禁止买任何枪和雷,其它地图又一切正常. 我尝试了下吧自己机器上的这些图删除,然后下载他们的下来,放在自己的服务器上,可是没用, 不知道有没有人知道他们是怎么做的,谢谢

在amx mod x的网站上晃悠了半天,一直查找不到custems map configs 这个插件, 这个插件的作用就是给每个地图设定一个自己的config, 可以设定重力,时间,武器限制阿什么的。
后来在amx mod x里面查到了一篇文章,内容如下, 现在我也没试, 我现在正躺在床上用笔记本呢,过2天有时间我会给大家翻译一下。只是很高兴的是,按这篇文章,这个功能已经被加到admin.amxx里面了,也就是说大家不需要另外下载,只需要配置好就可以了,哈哈哈



Last Updated Dec. 12th 2004

One of the newest "features" of AMX MOD X 1.0 (and higher) is the ability to create a map config based on the current map the server is running. Similar to that of what Admin Mod and what JustHoMi created for AMX Mod which was later ported to AMX MOD X.

This feature is very useful for many server admins that wish to enable low gravity on maps such as scoutzknivez when they are not around. Also useful to pause certain plugins on certain maps which you do not feel are needed, such as pausing a awp restriction plugin on awp_map.

How can I get the best use of this feature?

Well this feature comes standard in the admin.amxx plugin, meaning it will always available to you if you decide to use it.

First it is always a good idea to have any cvar you wish to change on a certain map defined in your server.cfg file. This file is located in your base directory of your half life mod.

server.cfg wrote:

mapchangecfgfile server.cfg
mp_timelimit 35
mp_timeleft 35
mp_c4timer 35
mp_buytime 1.5
mp_freezetime 5
mp_friendlyfire 1
mp_roundtime 3
mp_tkpunish 0
sv_gravity 800
sv_alltalk 0


Notice the very first line of the server.cfg. This must be in your server.cfg so apon any map change it will return your server to its default settings. You wouldnt want to play scoutzknivez on sv_gravity 200 and then change maps to de_aztec with sv_gravity 200 now would you?

IF you do not place mapchangecfgfile server.cfg in your server.cfg then you HAVE TO place any cvar into your amxx.cfg to allow your server settings return to normal.

How do I create a custom map config and where does it need to be placed?

To create a config file open up your favorite text editor (notepad will do) and go "file -> save as...". Then save your file as the map you want to create the config for such as de_dust and be sure to add the .cfg at the end thus giving you de_dust.cfg.

These config files go into your maps directory located in the configs folder of AMX MOD X. That simple  
Full location of this would be addons\amxmodx\configs\maps. If you do not have a maps folder in the configs directory then create one.

What if I want to restrict a plugin for that map only?

Lets say I want to restrict a plugin called "admin_allinone.amxx" on the map "de_aztec". I would first create a de_aztec.cfg and then place the following line.

de_aztec.cfg wrote:
amx_pausecfg pause admin_allinone.amxx


This would allow you to pause the plugin called "admin_allinone.amxx" for that map "de_aztec". Apon the next map change your plugin will be running once again, unless of course you pause it on the next map also. To pause any plugin just replace "admin_allinone.amxx" with what ever the plugin is named instead.

What if I want to restrict a weapon on a certian map?

Using the restmenu.amxx plugin that comes with AMX MOD X 1.0 COUNTER-STRIKE ADDON package you can also restrict weapons based on map. Lets say I dont want people to purchase AK47 on fy_iceworld.

fy_iceworld.cfg wrote:
amx_restrict on ak47


For a complete list of weapons on how to use the restrict command please look at the end of this post.

Lets put it all together now!

This is how I would have a custom map config for the map scoutzknivez

server.cfg wrote:
mapchangecfgfile server.cfg
mp_timelimit 35
mp_timeleft 35
sv_gravity 800
sv_alltalk 0


My scoutzknivez.cfg would look like this

scoutzknivez.cfg wrote:
amx_pausecfg pause admin_allinone.amxx
amx_restrict on ak47
mp_timelimit 20
mp_timeleft 20
sv_gravity 200
sv_alltalk 1


Then I would place the scoutzknivez.cfg into you maps directory located under the configs folder.

Why did I place the weapon restrict on ak47 for scoutzknivez? I did that as a example, I know you cant purchase weapons on that map. It is so you get the idea for other maps.

I hope this helps out everyone wishing to use custom map configs along with AMX MOD X.

Thanks,
BigBaller

Complete list of weapons for restmenu.amxx plugin
Make sure this plugin is running, this is included for the CSTRIKE package. This is a list of weapons and what you should do to restrict them on a per map basis if you are running the restmenu.amxx plugin on your server.

Weapons List wrote:
Weapon Name -> Restrict Name
H&K USP .45 Tactical -> usp
Glock18 Select Fire -> glock
Desert Eagle .50AE -> deagle
SIG P228 -> p228
Dual Beretta 96G Elite -> elites
FN Five-Seven -> fn57
Benelli M3 Super90 (pump shotty) -> m3
Benelli XM1014 (auto shotty) -> xm1014
H&K MP5-Navy -> mp5
Steyr Tactical Machine Pistol -> tmp
FN P90 -> p90
Ingram MAC-10 -> mac10
H&K UMP45 -> ump45
AK-47 -> ak47
Gali -> galil
Famas -> famas
Sig SG-552 Commando -> sg552
Colt M4A1 Carbine -> m4a1
Steyr Aug -> aug
Steyr Scout -> scout
AI Arctic Warfare/Magnum -> awp
H&K G3/SG-1 Sniper Rifle -> g3sg1
Sig SG-550 Sniper -> sg550
FN M249 Para (machine gun) -> m249
Kevlar Vest -> vest
Kevlar Vest & Helmet -> vesthelm
Flashbang -> flash
HE Grenade -> hegren
Smoke Grenade -> sgren
Defuse Kit -> defuser
NightVision Goggles -> nvgs
Tactical Shield -> shield
Primary weapon ammo -> primammo
Secondary weapon ammo -> secammo


Remember if you want to use these on a per map basis for restrict be sure to have something along the lines of

Quote:
amx_restrict on ak47
amx_restrict on m4a1
amx_restrict on sheild


I am sure you get the idea.
发表于 2005-12-17 21:08:48 | 显示全部楼层 来自 中国–天津–天津–和平区

回复: 求助 如何禁止特定的图购买手雷等

我也想知道,是不是用的什么插件阿????
回复

使用道具 举报

发表于 2005-12-19 00:50:06 | 显示全部楼层 来自 中国–广西–柳州

回复: 求助 如何禁止特定的图购买手雷等

我也需要,谁知道是怎么做的?
回复

使用道具 举报

发表于 2005-12-19 10:13:55 | 显示全部楼层 来自 中国–辽宁–沈阳

回复: 求助 如何禁止特定的图购买手雷等

只知道用禁用枪那插件可以禁用,不过什么地图都禁用。。
回复

使用道具 举报

发表于 2005-12-19 17:23:15 | 显示全部楼层 来自 中国–广西–玉林

回复: 求助 如何禁止特定的图购买手雷等

:eek: 修改插件指定哪个地图禁用某个或个武器吗?
回复

使用道具 举报

发表于 2005-12-19 18:31:37 | 显示全部楼层 来自 中国–广东–佛山–顺德区

回复: 求助 如何禁止特定的图购买手雷等

这样的插件强烈支持,太需要了
回复

使用道具 举报

发表于 2005-12-19 18:34:04 | 显示全部楼层 来自 中国–河北–石家庄

回复: 求助 如何禁止特定的图购买手雷等

:D :D :D :D ,我的设置和禁盾一样 直接添上
回复

使用道具 举报

发表于 2005-12-19 18:42:36 | 显示全部楼层 来自 中国–广东–佛山–顺德区

回复: 求助 如何禁止特定的图购买手雷等

Post by tyreal
:D :D :D :D ,我的设置和禁盾一样 直接添上

请教,你是如何指定更换到哪个地图就运行禁止设置的?
回复

使用道具 举报

发表于 2005-12-19 18:43:51 | 显示全部楼层 来自 中国–广东–广州–白云区

回复: 求助 如何禁止特定的图购买手雷等

禁止武器可以写成若干个涵数,比如
public noawp{}
public noo3{}
....

然后根据地图名字,暂停或者使用相应的涵数就可以了!
回复

使用道具 举报

发表于 2005-12-19 19:02:27 | 显示全部楼层 来自 中国–广东–佛山–顺德区

回复: 求助 如何禁止特定的图购买手雷等

Post by '[Grief.QQ
']禁止武器可以写成若干个涵数,比如
public noawp{}
public noo3{}
....

然后根据地图名字,暂停或者使用相应的涵数就可以了!

好人做到底,再写个判断地图名称的函数 :cool:
回复

使用道具 举报

游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

快速回复 返回顶部 返回列表