Forum

> > CS2D > Scripts > Something I want to ask about
Forums overviewCS2D overview Scripts overviewLog in to reply

English Something I want to ask about

2 replies
To the start Previous 1 Next To the start

old Something I want to ask about

Marcell
Super User Off Offline

Quote
So, I came up with a couple of questions. I know kind of the answer for a few, but not completely, hope there are other better ways do the the following ones.

So I am wondering, if there is any way to disable the cs2d cmd chooseteam, cs2d cmd team menu during joining? I wish to run the command later, through others ways or automatically at least.

Other than this, I was already also able to disable the default scoreboard completely, so I can build mine, but wondering if there is other way to do it?

(currently did it using cs2d cmd bind)

Probably the one that I definitely can't do, but I still would like to know if somehow magically I can manage to do is to remove this when someone joins: IMG:https://image.prntscr.com/image/90cuSwMbQ_a096KrfjFiXQ.png


Thanks

Edit: found a way to at least remove the player's choosemenu by making him spectator upon joining, so I can just use parese hook to remove his choosemenu, team.

Regarding the rest anyone can suggest something?
edited 2×, last 28.09.20 02:33:07 pm

old Re: Something I want to ask about

Masea
Super User Off Offline

Quote
There is a functional return value for cs2d lua hook team, set it to 1 and voilâ, team selection is disabled and the menu isn't shown (I am not sure about this though). You can also declare a boolean variable handling the team selection. If the variable is set to true, return 1 in a team hook function, otherwise do not return anything. For example, imagine we have a team hook function like that:
addhook("team", "_team")
function _team()
	if not teamSelection then
		return 1
	end
end
And if we want to set the team of somebody by code, do this:
teamSelection = true
parse("makect 1")
teamSelection = false


When it comes to the scoreboard disability, it is unfortunately not possible. I personally wanted to change it back in the day and use my own custom scoreboard instead but that's not going to be a thing either because devs already rejected my idea of disabling the default one since it breaks the game or something. Nevertheless, the current scoreboard is a lot better compared to the old one and represents many useful statistics to players. You can still set scores and deaths of players to mean something else just like user goweiwen did in their Tibia mod.

old Re: Something I want to ask about

Marcell
Super User Off Offline

Quote
That is true, although you can't disable kills and deaths in statistics. Because in my specific gamemode, only score would be actually important.

Apparently it will still show the choosemenu, seems it is also clientsided...
edited 2×, last 28.09.20 06:04:37 pm
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview