added note about TopMenuAction_DrawOption
Cancel vote option now only appears if a vote is in progress --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401530
This commit is contained in:
@@ -22,12 +22,23 @@ public AdminMenu_CancelVote(Handle:topmenu,
|
||||
if (action == TopMenuAction_DrawOption)
|
||||
{
|
||||
Format(buffer, maxlength, "%T", "Cancel vote", param);
|
||||
|
||||
if (IsVoteInProgress())
|
||||
{
|
||||
return ITEMDRAW_DEFAULT;
|
||||
}
|
||||
else
|
||||
{
|
||||
return ITEMDRAW_IGNORE;
|
||||
}
|
||||
}
|
||||
else if (action == TopMenuAction_SelectOption)
|
||||
{
|
||||
PerformCancelVote(param);
|
||||
RedisplayAdminMenu(topmenu, param);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public Action:Command_CancelVote(client, args)
|
||||
|
||||
Reference in New Issue
Block a user