Added sm_cancelvote to the base commands, as well as appropriate translations.
authorMichael McKoy <ferret99gt@gmail.com>
Wed Aug 08 21:32:06 2007 +0000 (2007-08-08)
changeset 1276501613e0859f
parent 1275 c4ff5fcf6f4c
child 1277 3645f873e752
Added sm_cancelvote to the base commands, as well as appropriate translations.
plugins/basecommands.sp
translations/common.phrases.txt
     1.1 --- a/plugins/basecommands.sp	Wed Aug 08 16:52:06 2007 +0000
     1.2 +++ b/plugins/basecommands.sp	Wed Aug 08 21:32:06 2007 +0000
     1.3 @@ -52,7 +52,8 @@
     1.4  	RegAdminCmd("sm_addban", Command_AddBan, ADMFLAG_RCON, "sm_addban <time> <steamid> [reason]");
     1.5  	RegAdminCmd("sm_banip", Command_BanIp, ADMFLAG_RCON, "sm_banip <time> <ip> [reason]");
     1.6  	RegAdminCmd("sm_reloadadmins", Command_ReloadAdmins, ADMFLAG_BAN, "sm_reloadadmins");
     1.7 -
     1.8 +	RegAdminCmd("sm_cancelvote", Command_CancelVote, ADMFLAG_VOTE, "sm_cancelvote");
     1.9 +	
    1.10  	hBanForward = CreateGlobalForward("OnClientBanned", ET_Hook, Param_Cell, Param_Cell, Param_Cell, Param_String);
    1.11  	hAddBanForward = CreateGlobalForward("OnBanAdded", ET_Hook, Param_Cell, Param_String, Param_Cell, Param_String);
    1.12  	hBanRemoved = CreateGlobalForward("OnBanRemoved", ET_Hook, Param_Cell, Param_String);
    1.13 @@ -601,3 +602,18 @@
    1.14  
    1.15  	return Plugin_Handled;
    1.16  }
    1.17 +
    1.18 +public Action:Command_CancelVote(client, args)
    1.19 +{
    1.20 +	if (IsVoteInProgress())
    1.21 +	{
    1.22 +		ReplyToCommand(client, "[SM] %t", "Vote Not In Progress");
    1.23 +		return Plugin_Handled;
    1.24 +	}
    1.25 +
    1.26 +	ShowActivity(client, "%t", "Cancelled Vote");
    1.27 +	
    1.28 +	CancelVote();
    1.29 +	
    1.30 +	return Plugin_Handled;
    1.31 +}
    1.32 \ No newline at end of file
     2.1 --- a/translations/common.phrases.txt	Wed Aug 08 16:52:06 2007 +0000
     2.2 +++ b/translations/common.phrases.txt	Wed Aug 08 21:32:06 2007 +0000
     2.3 @@ -163,4 +163,19 @@
     2.4  		"#format"		"{1:s}"
     2.5  		"en"			"This action cannot be performed on a dead client \"{1}\""
     2.6  	}
     2.7 +	
     2.8 +	"Vote in Progress"
     2.9 +	{
    2.10 +		"en"			"A vote is already in progress."
    2.11 +	}
    2.12 +	
    2.13 +	"Vote Not In Progress"
    2.14 +	{
    2.15 +		"en"			"A vote is not in progress at this time."
    2.16 +	}
    2.17 +	
    2.18 +	"Cancelled Vote"
    2.19 +	{
    2.20 +		"en"			"Cancelled the vote."
    2.21 +	}
    2.22  }