2007-10-02 16:34:45 +02:00
|
|
|
|
|
|
|
PerformCancelVote(client)
|
|
|
|
{
|
|
|
|
if (!IsVoteInProgress())
|
|
|
|
{
|
|
|
|
ReplyToCommand(client, "[SM] %t", "Vote Not In Progress");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2007-10-21 22:35:15 +02:00
|
|
|
ShowActivity2(client, "[SM] ", "%t", "Cancelled Vote");
|
2007-10-02 16:34:45 +02:00
|
|
|
|
|
|
|
CancelVote();
|
|
|
|
}
|
|
|
|
|
|
|
|
public AdminMenu_CancelVote(Handle:topmenu,
|
|
|
|
TopMenuAction:action,
|
|
|
|
TopMenuObject:object_id,
|
|
|
|
param,
|
|
|
|
String:buffer[],
|
|
|
|
maxlength)
|
|
|
|
{
|
2007-10-02 16:48:44 +02:00
|
|
|
if (action == TopMenuAction_DisplayOption)
|
2007-10-02 16:34:45 +02:00
|
|
|
{
|
|
|
|
Format(buffer, maxlength, "%T", "Cancel vote", param);
|
|
|
|
}
|
|
|
|
else if (action == TopMenuAction_SelectOption)
|
|
|
|
{
|
|
|
|
PerformCancelVote(param);
|
|
|
|
RedisplayAdminMenu(topmenu, param);
|
|
|
|
}
|
2007-10-02 17:13:13 +02:00
|
|
|
else if (action == TopMenuAction_DrawOption)
|
|
|
|
{
|
|
|
|
buffer[0] = IsVoteInProgress() ? ITEMDRAW_DEFAULT : ITEMDRAW_IGNORE;
|
|
|
|
}
|
2007-10-02 16:34:45 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public Action:Command_CancelVote(client, args)
|
|
|
|
{
|
|
|
|
PerformCancelVote(client);
|
|
|
|
|
|
|
|
return Plugin_Handled;
|
|
|
|
}
|
|
|
|
|