Thread: No Vote
View Single Post
`666
AlliedModders Donor
Join Date: Jan 2006
Old 07-21-2009 , 14:17   Re: No Vote
Reply With Quote #10

Quote:
Originally Posted by cs1.7 View Post
i would also like to stop players from typing "staus" in console. Could someone add it to the plugin?

+karma!!
like this i think

Code:
/* AMX Mod script. 
* 
* (c) 2003, OLO 
* This file is provided as is (no warranties). 
*
* Description:
plugin blocks the console commands like 
vote (kicking)
votemap (mapchange)
votekick (kicking)
voteban (banning)

only the ADMIN_LEVEL_A (that is flag m) can use it

change it to something else, like ADMIN_LEVEL_RCON so only very powerful admins can use it.



*/
#include <amxmodx>
#include <amxmisc>

public plugin_init() {
	register_plugin("No Vote", "0.1", "_KaszpiR_")
	register_clcmd("vote","vote_grab",ADMIN_LEVEL_A," <number>. Vote against a player form your team to kick.") 
	register_clcmd("votekick","votemap_grab",ADMIN_LEVEL_A," <number>. Vote to kick.") 
	register_clcmd("voteban","votemap_grab",ADMIN_LEVEL_A," <number>. Vote to ban.") 
	register_clcmd("votemap","votemap_grab",ADMIN_LEVEL_A," <number>. Vote to change a map.") 
	register_clcmd("status","status_grab",ADMIN_LEVEL_A," status") 
	return PLUGIN_CONTINUE
}

public vote_grab(id, level, cid)
{
	if (!cmd_access(id, level, cid,1)) 
		return PLUGIN_HANDLED_MAIN 
	return PLUGIN_CONTINUE
}

public votemap_grab(id, level, cid)
{
	if (!cmd_access(id, level, cid,1)) 
		return PLUGIN_HANDLED_MAIN 
	return PLUGIN_CONTINUE
}

public status_grab(id, level, cid)
{
	if (!cmd_access(id, level, cid,1)) 
		return PLUGIN_HANDLED_MAIN 
	return PLUGIN_CONTINUE
}

Last edited by `666; 07-25-2009 at 12:15. Reason: updated
`666 is offline