AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   CSDM (https://forums.alliedmods.net/forumdisplay.php?f=87)
-   -   Restrict weapons for certain maps (https://forums.alliedmods.net/showthread.php?t=46144)

pulpy 10-19-2006 14:10

Restrict weapons for certain maps
 
Hey, is their a cvar for restricing certain weapons per map? Like i can add it to a map.cfg or something... so like awp_city, only have awps, etc.

I have the beta of 2.1, upgrading shortly to 2.1 release, and i havent looked at it yet, but i checked the change log and didnt see anything about that.

BAILOPAN 10-19-2006 15:00

Re: Restrict weapons for certain maps
 
Read about per-map configs in the FAQ, you can achieve per-map restrictions with that.

pulpy 10-19-2006 15:06

Re: Restrict weapons for certain maps
 
well i know about those, i just dont know how to do it with csdm for its weapon selections

BAILOPAN 10-19-2006 19:11

Re: Restrict weapons for certain maps
 
It would follow that if you can have a config file for each map, you can re-configure the weapons for each map.

pulpy 10-20-2006 00:37

Re: Restrict weapons for certain maps
 
ya, i realize that, just didnt know exactly what to put in each .cfg file as i know in csdm.cfg u choose the weapon layouts.. so do i simply copy the weapon layout from there, paste it into the .cfg file, and enable/disable the weapons i choose?

BAILOPAN 10-20-2006 12:46

Re: Restrict weapons for certain maps
 
Yup. Just make sure the section header is there.

pulpy 10-20-2006 13:22

Re: Restrict weapons for certain maps
 
alright thx

pulpy 10-23-2006 00:42

Re: Restrict weapons for certain maps
 
hmm i tried it.. it doesnt seem to wanna work.. now when u sai section header.. what part is that?

oh heres my .cfg for the map

amxx unpause csdm_equip.amxx
mp_timelimit 25
amxx pause csdm_spawn_preset.amxx


[secondary]
usp USP 1
glock18 Glock 1
deagle Deagle 1
p228 P228 1
elite Elite 1
fiveseven "Five Seven" 1

[primary]
m4a1 M4A1 1
ak47 AK47 1
aug AUG 1
sg552 SG552 1
galil Galil 1
famas Famas 1
scout Scout 1
awp AWP 0
sg550 SG550 0
m249 M249 0
g3sg1 G3SG1 0
ump45 "UMP 45" 1
mp5navy "MP5 Navy" 1
m3 M3 1
xm1014 XM1014 1
tmp TMP 1
mac10 "Mac 10" 1
p90 P90 1

pulpy 10-24-2006 17:59

Re: Restrict weapons for certain maps
 
BAIL, or anyone know about this? :/

teame06 10-24-2006 19:12

Re: Restrict weapons for certain maps
 
http://www.bailopan.net/csdm/index.php?page=faq

Read the first FAQ on that page.

HelllBoy 11-04-2006 07:02

Re: Restrict weapons for certain maps
 
hmm i can`t restrict weapons in csdm for certain maps
ex:
i want to play a map just with pistols
or play awp_india just with awp

i try but dont work

pls help me somebody

HelllBoy 11-05-2006 13:05

Re: Restrict weapons for certain maps
 
pls edit for me a cfg with all that are included and help me to activate

KWo 11-05-2006 14:54

Re: Restrict weapons for certain maps
 
Quote:

Originally Posted by FAQ
Q1: Can I have per-map configuration?
A1: Yes. First, look at AMX Mod X's Per-Map Config Setup. All you have to is make a custom map file that executes csdm_reload. csdm_reload will load a CSDM config file if it's somewhere in the configs dir. For example:

csdm_reload "csdm\extraconfigs\itemstuff.cfg"

Note that these "extra" config files can be simple. You only need to include what's different from the master csdm.cfg file.

First You need to check how AMX X works with per-map configuartion.

Quote:

Originally Posted by AMX MOD X HELP
For each map, you can also add a configuration file that will execute when the map loads. This is useful to set certain settings for 3rd party maps, say, removing the freeze time on fy_iceworld.

To do this, simply create a folder in addons\amxmodx\configs called "maps" and place a .cfg file named after the map with the settings in it, for example, you might have addons\amxmodx\configs\maps\fy_iceworld.cfg:
mp_startmoney 16000
mp_freezetime 0
mp_timelimit 20

After concatenating the info from these 2 docs You know this:
1. You need to create a folder called "maps" in addons\amxmodx\configs\
2. You need to create the file for Your specyfic map - for example cs_india.cfg and place it in the folder created as above (in point 1).
3. In that file You should write
csdm_reload "csdm\extraconfigs\items_cs_india.cfg"
4. You need to create the file items_cs_india.cfg and place it in addons\amxmodx\configs\csdm\extraconfigs folder.
5. The file items_cs_india.cfg should contain only the differences to Your csdm.cfg with all differenties You need especially for cs_india map. In Your case You wanted awp only (so I consider no nades, no pistols and no armor) - it should look so:

Quote:

Originally Posted by items_cs_india.cfg
[equip]

;Equip Menu flags:
; p - primary
; s - secondary
; a - armor
; g - grenade
; b - buy
menus = p

;Autoitem flags:
; a - armor
; h - helmet
; g - grenades
; d - defusekit (CTs only!)
; n - nightvision
autoitems =

;Grenade flags:
; f - flashbang
; h - he grenade
; s - smoke grenade
grenades =

;Sets number of flashbangs given if
; grenades are enabled
fnadesnum = 0

;;;;;;;;;;;;;;;;
;;WEAPON MENUS;;
;;;;;;;;;;;;;;;;

;Format for weapon menus is:
;shortname "Display Name" menupage
;Change the '1' to a '0' to block the weapon
;Removing or moving things
; from the list will change the order of the menus!

[secondary]
usp USP 0
glock18 Glock 0
deagle Deagle 0
p228 P228 0
elite Elite 0
fiveseven "Five Seven" 0

[primary]
m4a1 M4A1 0
ak47 AK47 0
aug AUG 0
sg552 SG552 0
galil Galil 0
famas Famas 0
scout Scout 0
awp AWP 1
sg550 SG550 0
m249 M249 0
g3sg1 G3SG1 0
ump45 "UMP 45" 0
mp5navy "MP5 Navy" 0
m3 M3 0
xm1014 XM1014 0
tmp TMP 0
mac10 "Mac 10" 0
p90 P90 0

;List weapons here the bots can randomly have
;The short name must match one in the list above
[botsecondary]

[botprimary]
awp

Note - I haven't tryied that - I just believe in this what is written in docs. If it doesn't work - only BAILOPAN can help You with this. And stop spamming other topics to bring up attention of the people at Your problem. I believe You know what I mean with spamming other topic.
If it works I can ask BAILOPAN to make this topic as sticky.

HelllBoy 11-06-2006 06:23

Re: Restrict weapons for certain maps
 
dont work :nono: i`m gona crazy my mind :cry:

the cgf dont want to execute , i make a directory in addons\amxmodx\configs called maps , and i put a cfg file named awp_india.cfg . in awp_india.cfg i write csdm_reload "csdm\extraconfigs\items_awp_india.cfg"

now in addons\amxmodx\configs\csdm\extraconfigs i create a file cfg items_awp_india.cfg and i write :

;Equip Menu flags:
; p - primary
; s - secondary
; a - armor
; g - grenade
; b - buy
menus = p

;Autoitem flags:
; a - armor
; h - helmet
; g - grenades
; d - defusekit (CTs only!)
; n - nightvision
autoitems = ahg

;Grenade flags:
; f - flashbang
; h - he grenade
; s - smoke grenade
grenades = h

;Sets number of flashbangs given if
; grenades are enabled
fnadesnum = 0

;;;;;;;;;;;;;;;;
;;WEAPON MENUS;;
;;;;;;;;;;;;;;;;

;Format for weapon menus is:
;shortname "Display Name" menupage
;Change the '1' to a '0' to block the weapon
;Removing or moving things
; from the list will change the order of the menus!

[secondary]
usp USP 1
glock18 Glock 1
deagle Deagle 1
p228 P228 0
elite Elite 0
fiveseven "Five Seven" 0

[primary]
m4a1 M4A1 0
ak47 AK47 0
aug AUG 0
sg552 SG552 0
galil Galil 0
famas Famas 0
scout Scout 0
awp AWP 1
sg550 SG550 0
m249 M249 0
g3sg1 G3SG1 0
ump45 "UMP 45" 0
mp5navy "MP5 Navy" 0
m3 M3 0
xm1014 XM1014 0
tmp TMP 0
mac10 "Mac 10" 0
p90 P90 0

;List weapons here the bots can randomly have
;The short name must match one in the list above
[botsecondary]
usp
glock
deagle

[botprimary]
awp


what is wrong

HelllBoy 11-06-2006 06:39

Re: Restrict weapons for certain maps
 
and ai have a new problems
why my admins can edit spawns how can i restict that acces
i want only me or only with RCON acces to can edit spawns
P.S. that guy dont have admin with amx he have just 9 comand when check amx_help
but have moderator in adminmod

KWo 11-06-2006 08:44

Re: Restrict weapons for certain maps
 
About the item map specyfic configuration - I have to check my-self it first to tell You what might be wrong.
About Your second question - there is ADMIN_MAP check for availability that menu. I may add also the check for command execution of showing that menu if the user has sufficent access rights, but it might be some interference with Adminmod - need ask Bailopan.
Show me Your users.ini - just change only the passwords while posting for Your safety.

KWo 11-06-2006 16:55

Re: Restrict weapons for certain maps
 
Everything I wrote You was correct. It works, but You need some fixed sma. :D
There was a bug in csdm_main.sma - with only 32 character it was impossible to load correctly any map specyfic file (because even the standard path - csdm\extraconfigs\ - takes about 19 characters - if Your map specyfic file is longer than 13 characters (items_cs_india.cfg takes 18 charecters) it couldn't work. Try that sma in the attachement.
NOTE - THIS FILE IS A BETA - IT'S NOT OFFICIALLY SUPPORTED BY CSDM DEV TEAM. You can use it only for Your tests until the fix is officially approved by CSDM Dev team / original plugin's author. If You don't want to use this beta sma You can try to work with the officially released in 2.1 csdm_main.sma but You need to make shorter the path and the filename to don't exceed 32 characters for path+filename.
That beta at least works for me - I 've changed only that length of the path/filename to 127 charecters... :)

[EDIT]
Instead the only one csdm_main.sma file I posted here use the whole beta I posted here.

HelllBoy 11-07-2006 18:01

Re: Restrict weapons for certain maps
 
i give up for now ... maybe in the future you make more easy restriction something like this :
every map i want just write in console :

amx_restrict ak47
amx_restrict m4a1
etc
after that
amx_restrict save

or csdm_restrict ak47
csdm_restrict m4a1

csdm_restrict save

i think is the best way

KWo 11-07-2006 18:50

Re: Restrict weapons for certain maps
 
Quote:

Originally Posted by HelllBoy
i give up for now ...

Wait, wait, wait... I've put so big effort to explain it You how uts should work, I even tested it and found a bug, fixed it posted the new sma file for You (You should have only recompile it), but You give up with this so easy?

Yes - there is restrictions system in CSDM (You need to read csd,cfg file) - but... anyway You need to load map specyfic file to get it working on the specyfic maps You need. :)

HelllBoy 11-08-2006 11:18

Re: Restrict weapons for certain maps
 
man you are a good guy , pls help me and compile me that sma form me , now my server i belive is the best from romania , we try hard to make good server with low resurse , i have a server with 30 slots and is 1000% full .
i want so hard to play big map like cbble just with pislols and i hope to can help me

KWo 11-08-2006 11:54

Re: Restrict weapons for certain maps
 
I'll try to compile it against AMX X 1.76b (I believe You are using that version) when I'll be at home later (after few hours). But You can compile it Your-self - just put that sma I posted into amxmodx/scripting folder (after uznipping). Make sure in Your amxmodx/scripting/include there is a file called csdm.inc (it exists in csdm2.1 release pack). If everything is in the correct place, just go back to the amxmodx\scripting folder and hit (by "Enter" key) the file called compile.exe...
Then in the folder scripting/compiled You should see some compiled files - also csdm_main.amxx - copy it to amxmodx/plugins folder (overwrite the old one).

KWo 11-08-2006 14:55

Re: Restrict weapons for certain maps
 
OK - here You have the compiled file csdm_main.amxx (zipped). Please try it and let me know if it works for You. Don't forget restart the server.

[EDIT]Use whole the beta instead.[/EDIT]

HelllBoy 11-10-2006 03:55

Re: Restrict weapons for certain maps
 
i belive it works i tested for 2 maps

you are good man ty

now i must ask somting my server is for 30 slots but few maps are to liltle for 30 people and make lag

can i set sv_maxplayers 20 or 30 for certain maps ?

KWo 11-10-2006 14:47

Re: Restrict weapons for certain maps
 
If I remember good - You cannot change the cvar mp_maxplayers in-game. But You should ask about that rather at AMX X Offtopic forum.

Back to Your map specyfic weapons configurations - if You got finally working that what I was elaborating for You last few days - You can try to go one step ahead. For now when You are playing cs_india with awp only, You can see stupid equip menus with all items unavailable with available awp only (on the second or third page) instead to see only 1 page wth available awp only. Do You now what I mean? You can remove all unwanted items from the menu. To do this You can try to edit Your items_awp_india.cfg so:
Quote:

Originally Posted by items_awp_india.cfg
[secondary]

[primary]
awp AWP 1

I mean - edit only these 2 parts - for secondary and for primary weapons - the first one is empty, the second is awp only - so You have now in Your gun menu awp only as the only available weapon (instead 3 pages ith useless unavailable weapons). Don' need to write all these lines with 0 at the end. Let me know if You like it so when You get it working.

pulpy 11-12-2006 20:36

Re: Restrict weapons for certain maps
 
KWO, i did the per map csdm reload thing, it works, thx great work!

bmann_420 01-28-2007 22:25

Re: Restrict weapons for certain maps
 
This way seems to work "visually". I will try yours just above KWo. But my issue is I have all the configs setup for disabeling the 2 Auto snipers and awp. THey are greyed out of the guns menu, but you can still get them by hitting the button they represent... Pissin me off, so ill try your main up above and see eh

I find that is takes the menu away completely, I diddnt read enought I guess. But I still have that issue.

bmann_420 01-29-2007 01:39

Re: Restrict weapons for certain maps
 
I tried Bail's and KWo's and with Bail's stock one no menu shows up... And KWo's the menu shows up but the weapons that are restricted are "greyed out" but able to be bought.

KWo 01-29-2007 04:00

Re: Restrict weapons for certain maps
 
Try the version csdm_equip 2.1g posted here with the pack 2.1f (replace only csdm_equip in that beta) and let me know if it works. I don't have time to figure it out what is the problem with these grayed up but available menus. More than likely there is some bug in the new menu system (with callback functions), but I don't have time to work on it right now. Before that I don't want to bother Bailopan. Temporary I did some workaround for that.

bmann_420 01-29-2007 04:20

Re: Restrict weapons for certain maps
 
Thank you, I will try it.

Aje 03-05-2008 17:09

Re: Restrict weapons for certain maps
 
Im interested in doing this... But the posts confuse me... its say many different ways and theres 2 files to download by KWo.

Im unsure which is working and which is the common method... I checked the current file for weapons and its not in the layout given above...

Someone please help me. Thanks

KWo 03-06-2008 15:06

Re: Restrict weapons for certain maps
 
Just use my beta and Your per map config things and it should be OK...

Aje 03-06-2008 21:26

Re: Restrict weapons for certain maps
 
Quote:

Originally Posted by KWo (Post 593885)
Just use my beta and Your per map config things and it should be OK...

ok kool... Do i need to do anything elese other than installing ur version?

I want to play cs_deagle5 with deagles only

Cheers

KWo 03-07-2008 02:35

Re: Restrict weapons for certain maps
 
Yes - after isntalling You just need to read a bit the config files and also this topic here - about per map config things.

Aje 03-07-2008 20:12

Re: Restrict weapons for certain maps
 
Quote:

Originally Posted by KWo (Post 594103)
Yes - after isntalling You just need to read a bit the config files and also this topic here - about per map config things.

Wouldn't it work if i add the per map config file with the Official CSDM V2.1?

I have put in this file
C:\Counter-Strike\cstrike\addons\amxmodx\configs\maps

Code:

;;;;;;;;;;;;;;;;
;;WEAPON MENUS;;
;;;;;;;;;;;;;;;;

;Format for weapon menus is:
;shortname "Display Name" menupage
;Change the '1' to a '0' to block the weapon
;Removing or moving things
;  from the list will change the order of the menus!

[secondary]
usp USP 0
glock18 Glock 0
deagle Deagle 1
p228 P228 0
elite Elite 0
fiveseven "Five Seven" 0

[primary]
m4a1 M4A1 0
ak47 AK47 0
aug AUG 0
sg552 SG552 0
galil Galil 0
famas Famas 0
scout Scout 0
awp AWP 0
sg550 SG550 0
m249 M249 0
g3sg1 G3SG1 0
ump45 "UMP 45" 0
mp5navy "MP5 Navy" 0
m3 M3 0
xm1014 XM1014 0
tmp TMP 0
mac10 "Mac 10" 0
p90 P90 0

mp_freezetime 0
mp_timelimit 0

Could you also help me with sv_downloadurl Please?

Thanks

Link: http://forums.alliedmods.net/showthread.php?t=67825

KWo 03-08-2008 15:54

Re: Restrict weapons for certain maps
 
Quote:

Originally Posted by Aje (Post 594328)
Wouldn't it work if i add the per map config file with the Official CSDM V2.1?

I have put in this file
C:\Counter-Strike\cstrike\addons\amxmodx\configs\maps

You need to have there the file called cs_deagle5.cfg with these lines:
Code:

csdm_reload "csdm\extraconfigs\items_cs_deagle5.cfg"
mp_freezetime 0
mp_timelimit 0

As You can see these cvars should be here, and the map specyfic configuration You have posted (except these 2 last lines they are already above) should be stored in the file items_cs_deagle5.cfg placed in csdm\extraconfigs folder (this what You have posted with all pistols greyed out except deagle and primary weapon grayed out).
There is also a better solution - instead have all grayed items in the menu You don't need to have them at all except deagle. All You need is this:
Code:

[secondary]
deagle Deagle 1

[primary]

[equip]
menus = s

Instead asking if it works with original 2.1 (You should use 2.1.1 if You are using AMX X 1.8.0) just try if it works - it will take You less time than waiting for my reply. It should, but with 2.1 version was a problem with too short path possible for extraconfig files (fixed a bit, but not finally in 2.1.1). In my version it works.

Aje 03-08-2008 19:43

Re: Restrict weapons for certain maps
 
will that disable the CSDM weapon choose?

Cos maps like cs_deagle5 provide deagle.. and i dont want others to buy anything elese... Similar with awp maps

KWo 03-09-2008 05:55

Re: Restrict weapons for certain maps
 
Quote:

Originally Posted by Aje (Post 594700)
will that disable the CSDM weapon choose?

Cos maps like cs_deagle5 provide deagle.. and i dont want others to buy anything elese... Similar with awp maps

Yes, it is supposed to do exactly that. The only thing You will be able to see in Equip menu will be the deagle. I don't know if You are leting the people to use nades or helmet and kevlar on cs_deagle5 map, but if not - You can also disable them this way,having these lines in items_cs_deagle5.cfg:
Code:

autoitems =
grenades =

Just try to change those settings to see what they have the influence for what, then You will be able understand better what I'm trying to explain You. You just need to do more tests.

Darknightcze2 10-03-2008 06:03

Re: Restrict weapons for certain maps
 
I have problem.
Restrict weapon per map working.
But when i connect fast(select team) after change map.
Show me original default weapon menu with all guns. (here i can choose primary weapon without problems.)
After show in chat "[CSDM] Config file reloaded" (config with etc. only dgl) AMXX late load map config.
When user connect late. He have menu with only deagle.

Code:

configs/maps/cs_deagle5.cfg
csdm_reload "csdm\extraconfigs\csdm-dgl.cfg"


configs/csdm/extraconfigs/csdm-dgl.cfg
[secondary]
;usp USP 1
;glock18 Glock 1
deagle Deagle 1
;p228 P228 1
;elite Elite 1
;fiveseven "Five Seven" 1

[primary]
m4a1 M4A1 0
;ak47 AK47 1
;aug AUG 1
;sg552 SG552 1
;galil Galil 1
;famas Famas 1
;scout Scout 1
;awp AWP 1
;sg550 SG550 1
;m249 M249 1
;g3sg1 G3SG1 1
;ump45 "UMP 45" 1
;mp5navy "MP5 Navy" 1
;m3 M3 1
;xm1014 XM1014 1
;tmp TMP 1
;mac10 "Mac 10" 1
;p90 P90 1
[equip]

;Equip Menu flags:
menus = sa

AMXX-modules
Code:

11:01:26 Currently loaded modules:
        name                    version    author              status   
        MySQL                  1.8.1.3746  AMX Mod X Dev Team  running   
        Fun                    1.8.1.3746  AMX Mod X Dev Team  running   
        Engine                  1.8.1.3746  AMX Mod X Dev Team  running   
        FakeMeta                1.8.1.3746  AMX Mod X Dev Team  running   
        CStrike                1.8.1.3746  AMX Mod X Dev Team  running   
        CSX                    1.8.1.3746  AMX Mod X Dev Team  running   
        Ham Sandwich            1.8.1.3746  AMX Mod X Dev Team  running   
        GeoIP                  1.8.1.3746  AMX Mod X Dev Team  running   
        CSDM2                  2.1.1      CSDM Team            running   
        9 modules


Teambash 10-18-2009 11:10

Re: Restrict weapons for certain maps
 
i need help.

I search a plugin who the terrorist no weapon glock have for jail mod can zou help me

the weapon glock and usp have all person a tt an ct can a block the weapon and beginn in the new round all knife no usp and glock pls help meee


sorry my englisch is very bad

The Art of War 01-28-2010 12:33

Re: Restrict weapons for certain maps
 
Lol, if you have a HLDS, just go to configs and then theres a map in which you can restrict weapons on certain maps. Even I (which is one of the greatest noobs in the universe of coding) did it :D


All times are GMT -4. The time now is 17:47.

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