AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   No Vote (https://forums.alliedmods.net/showthread.php?t=43300)

_KaszpiR_ 08-16-2006 14:39

No Vote
 
1 Attachment(s)
Overview
Disables builtin commands in game, that are available via client console:
vote (kicking)
votemap (mapchange)
votekick (kicking)
voteban (banning)

Only the ADMIN_LEVEL_A (that is flag m) can use them
No extra modules requires, should actually work with any mod under Half-Life.

Installation
Compile or get the .amxx, put the .amxx to plugins directory.
Add no_vote.amxx on the end of file AMX Mod X plugins.ini.
Change map.

Updates
Future releases - rahter not, because of laziness.


Extra info
Change ADMIN_LEVEL_A to something else, like ADMIN_LEVEL_RCON so only very powerful admins can use it, and recompile (of course) and update with new .amxx

Notice: should work with AMX Mod aswell, after changing <amxmodx> to <amxmod>

`666 08-17-2006 15:50

Re: No Vote
 
Nice one! that should stop noobs from vote kick players for no good reason.

ThomasNguyen 08-17-2006 18:10

Re: No Vote
 
Can u make cvars for every one of those commands? like
amx_votekick_public 1/0
amx_voteban_public 1/0
amx_votemap_public 1/0
amx_bantime Default: 30

and is it possible to make these chat commands?

_KaszpiR_ 08-17-2006 19:44

Re: No Vote
 
1. cvars, maybe in a weekend
2. what say commands?

ThomasNguyen 08-18-2006 10:02

Re: No Vote
 
Like instead of going in th e console, say something like /votemap in chat and it will trigger the console command.

_KaszpiR_ 08-18-2006 10:38

Re: No Vote
 
there are other plugins for that, like voteaccess

Brad 12-11-2006 10:14

Re: No Vote
 
If you make each vote setting use a separate CVAR to determine who has access to the command, it'll be approved. It's too constricted as is.

I suggest something like voteaccess_votemap and then having the user supply the the admin flags that have access to that command. I have some code that could help you if you need it.

It also wouldn't hurt, but is not needed for approval, to add say commands for the votes. Yes, other plugins do that but your plugin would still be unique because of providing the ability to restrict the commands to certain levels.

`666 07-23-2008 03:34

Re: No Vote
 
doesn't block commands in cz for some reason
PHP Code:

#include <amxmodx>
#include <amxmisc>

public plugin_init() {
    
register_plugin("No Vote""0.1""_KaszpiR_")
    
register_clcmd("vote","vote_grab",ADMIN_IMMUNITY," <number>. Vote against a player form your team to kick."
    
register_clcmd("votemap","votemap_grab",ADMIN_IMMUNITY," <number>. Vote to change a map."
    
register_clcmd("fullupdate","fullupdate_grab",ADMIN_IMMUNITY," fullupdate"
    return 
PLUGIN_CONTINUE
}

public 
vote_grab(idlevelcid)
{
    if (!
cmd_access(idlevelcid,1)) 
        return 
PLUGIN_HANDLED_MAIN 
    
return PLUGIN_CONTINUE
}

public 
votemap_grab(idlevelcid)
{
    if (!
cmd_access(idlevelcid,1)) 
        return 
PLUGIN_HANDLED_MAIN 
    
return PLUGIN_CONTINUE
}

public 
fullupdate_grab(idlevelcid)
{
    if (!
cmd_access(idlevelcid,1)) 
        return 
PLUGIN_HANDLED_MAIN 
    
return PLUGIN_CONTINUE



cs1.7 07-21-2009 08:48

Re: No Vote
 
i would also like to stop players from typing "staus" in console. Could someone add it to the plugin?

+karma!!

`666 07-21-2009 14:17

Re: No Vote
 
Quote:

Originally Posted by cs1.7 (Post 877820)
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
}



All times are GMT -4. The time now is 08:48.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.