Forum

> > CS2D > General > mp_building_limit not working?
ForenübersichtCS2D-ÜbersichtGeneral-ÜbersichtEinloggen, um zu antworten

Englisch mp_building_limit not working?

19 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt mp_building_limit not working?

sonnenschein
User Off Offline

Zitieren
I have tried mp_building_limit but its not working, or I should add something different
1
mp_building_limit 1
Gives me this error:
ERROR: building '1' does not exist!

alt Re: mp_building_limit not working?

sonnenschein
User Off Offline

Zitieren
Thanks leegao
but is it going to be saved? Does it saves anywhere?
New one only wall
1
mp_building_price Wall 1
ERROR: building 'wall' does not exist!
and
1
mp_building_limit Gate Field 20
ERROR: building 'gate' does not exist!
3× editiert, zuletzt 05.04.09 11:46:01

alt Re: mp_building_limit not working?

DC
Admin Off Offline

Zitieren
you have to use the real names of the buildings as you see them in the game! there is no "Wall" but "Wall I", "Wall II" and "Wall III"! moreover you have to use quotes as soon as the names contain spaces.

mp_building_price "Wall I" 1
mp_building_limit "Gate Field" 20

moreover please note that you can only set the limit for "Turret" and not for "Dual Turret" and "Triple Turret". The "Turret"-limit is the limit for all types of turrets.
1× editiert, zuletzt 05.04.09 12:58:29

alt Re: mp_building_limit not working?

Lee
Moderator Off Offline

Zitieren
Zitat
but is it going to be saved? Does it saves anywhere?


Add it into the more.cfg, the autoexec.cfg, or even as a lua script.

alt Re: mp_building_limit not working?

DC
Admin Off Offline

Zitieren
all mp_building commands are fully working. I just wasted my time for re-testing them because of your posts.

you are probably doing something wrong but I can't help you without seeing how you entered the commands.

moreover please note
• that you can't change the price for upgrading atm.
• that you will always see the default price when you are not the server

alt Re: mp_building_limit not working?

DC
Admin Off Offline

Zitieren
sorry for the following post but: awww. PAIN!

• "Gate Field III" such a building DOES NOT exist! cs2d is 100% right about that!
• you forgot the quotes! you have to use quotes as soon as one of the parameters contains spaces. I just wrote that some posts above.
(• you left out the price)

again: a working example would be
mp_building_price "Gate Field" 5

I already posted examples above! Is it really that hard to copy and paste them?!

alt Re: mp_building_limit not working?

RedPillow
User Off Offline

Zitieren
If i do lua script about this will it just be like:

1
2
3
4
mp_building_limit Turret 4
mp_building_limit Supply 3
mp_building_limit "Gate Field" 5
mp_building_limit Dispenser 2

Or do i need to put some parse, hook, or other lua crap in it? if i do, can someone make a script with those "mp_"- settings
and post it here

alt Re: mp_building_limit not working?

sonnenschein
User Off Offline

Zitieren
What do you want to make with this? Do you want these settings to execute when you run the server?
In that case, i made this line in the autoexec.cfg
1
exec sys/yourfilename.cfg
Replace "yourfilename" with the file you created. That file must be cfg. (maybe must be)
When you do that, create the file with regular text editor, put the commands, and save it as "yourfilename.cfg."
And thats it :D. When you run the server, the commands will be executed.

*NOTE*: You could just put the commands in the autoexec.cfg, but this option is...clean, you know where are the scripts
And be sure to check the server. If you did alright, the limits will be just like you put em.

alt Re: mp_building_limit not working?

RedPillow
User Off Offline

Zitieren
umm, could someone give me a lua script which enables these options @ start of the map and leaves other options like they are now.

options:

mp_building_limit turret 4

mp_building_limit supply 3

mp_building_limit "Gate Field" 5

mp_building_limit dispenser 2

thanks!

alt Re: mp_building_limit not working?

DC
Admin Off Offline

Zitieren
@Jonzku777: don't spam or you get a ban!

you have to use parse to execute regular CS2D commands in Lua!
1
2
3
parse("mp_building_limit turret 4")
parse("mp_building_limit supply 3")
[...]

alt Full set!

craza424
User Off Offline

Zitieren
Paste this into notepad and save as... example InfBuild.lua in your lua file in cs2d and then put,
dofile ("sys/lua/InfBuild.lua")

Here it is....
parse("mp_building_limit Turret 9999")
parse("mp_building_limit Supply 9999")
parse("mp_building_limit Dispenser 9999")
parse("mp_building_price Turret 5000")
parse("mp_building_price Supply 5000")
parse("mp_building_price Dispenser 5000")
lim = 'mp_building_limit "%s" 9999'
parse (lim:format("Gate Field"))
parse (lim:format("Wall I"))
parse (lim:format("Wall II"))
parse (lim:format("Wall III"))
parse (lim:format("Teleporter Entrance"))
parse (lim:format("Teleporter Exit"))
parse (lim:format("Barricade"))
parse (lim:format("Barbed Wire"))

Thats no build limit for EVERYTHING, even teleporters!
Enjoy!

EDIT: If you do not understand this, here is the script..
http://unrealsoftware.de/files_show.php?file=2248
1× editiert, zuletzt 23.09.09 08:18:15

alt Re: mp_building_limit not working?

Kiffer-Opa
User Off Offline

Zitieren
By the way: You can save a lot of trouble with the quotes if you know that Lua accepts some more string characters:
"string"
'string'
[[string]]

Whenever you use the parse function, I recommend the ' or the [[]] characters, to avoid conflicts with CS2D script code:

1
2
parse('mp_building_limit "Gate Field" 1000')
parse([[mp_building_limit "Barbed Wire" 1000]])

If you still prefer ", then you can use \" inside of a string to represent " as a character and not as the end of string.

1
parse("mp_building_limit \"Teleporter Entrance\" 2")
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antwortenGeneral-ÜbersichtCS2D-ÜbersichtForenübersicht