-
Couldn't load subscription status.
- Fork 24
Add restrictions in cmd start and stop vote #23
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
base: master
Are you sure you want to change the base?
Changes from all commits
3ec9362
b91601f
83cc614
8270e65
f487ff8
d02b043
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -240,6 +240,10 @@ restore_limits() | |
| } | ||
| public concmd_startvote(id, level, cid) | ||
| { | ||
| if(is_vote_started() || is_vote_finished() || is_vote_will_in_next_round()) { | ||
| return PLUGIN_HANDLED; | ||
| } | ||
|
|
||
| if(!cmd_access(id, level, cid, 1)) { | ||
| return PLUGIN_HANDLED; | ||
| } | ||
|
|
@@ -257,6 +261,10 @@ public concmd_startvote(id, level, cid) | |
| } | ||
| public concmd_stopvote(id, level, cid) | ||
| { | ||
| if(is_vote_finished()) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why |
||
| return PLUGIN_HANDLED; | ||
| } | ||
|
|
||
| if(!cmd_access(id, level, cid, 1)) { | ||
| return PLUGIN_HANDLED; | ||
| } | ||
|
|
||
There was a problem hiding this comment.
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()добавь квар.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Что должен делать квар?