Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add restrictions in cmd start and stop vote #23

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Nord1cWarr1or
Copy link
Contributor

We need to add restrictions in cmd start and stop vote. Now they can cause bugs.
For example: the voting is starts in new round. If now make mapm_stop_vote, then mp_timelimit will stay "0"

@Nord1cWarr1or
Copy link
Contributor Author

@Mistrick how do you think, maybe add a console message for player?

@@ -240,6 +244,10 @@ public concmd_startvote(id, level, cid)
}
public concmd_stopvote(id, level, cid)
{
if(is_vote_finished()) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is_vote_finished() -> !is_vote_started()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why

@@ -227,6 +227,10 @@ restore_limits()
}
public concmd_startvote(id, level, cid)
{
if(is_vote_started() || is_vote_finished() || is_vote_will_in_next_round()) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Вынеси is_vote_started() в отдельное условие.
Для is_vote_finished() || is_vote_will_in_next_round() добавь квар.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Что должен делать квар?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants