added voting category and a menu option for cancelling votes

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401529
This commit is contained in:
David Anderson
2007-10-02 14:34:45 +00:00
parent 7cb4d7ae9c
commit ee90188103
4 changed files with 70 additions and 15 deletions
+39
View File
@@ -0,0 +1,39 @@
PerformCancelVote(client)
{
if (!IsVoteInProgress())
{
ReplyToCommand(client, "[SM] %t", "Vote Not In Progress");
return;
}
ShowActivity(client, "%t", "Cancelled Vote");
CancelVote();
}
public AdminMenu_CancelVote(Handle:topmenu,
TopMenuAction:action,
TopMenuObject:object_id,
param,
String:buffer[],
maxlength)
{
if (action == TopMenuAction_DrawOption)
{
Format(buffer, maxlength, "%T", "Cancel vote", param);
}
else if (action == TopMenuAction_SelectOption)
{
PerformCancelVote(param);
RedisplayAdminMenu(topmenu, param);
}
}
public Action:Command_CancelVote(client, args)
{
PerformCancelVote(client);
return Plugin_Handled;
}