Im using amx_evilstfu posted here linky (http://www.dodplugins.net/forums/showthread.php?t=1534&highlight=amx_evilstfu).
Now all I did is change from ADMIN_BAN to ADMIN_KICK...I can restarted the map, restarted the server. I deleted the original .amxx file and replaced it with the updated version...whatever I do, when someone only has the c flag for ADMIN_KICK, it wont allow them to access to command yet when someone has ADMIN_BAN they can...
Any idea how to update this?
Ensure that you have changed it from ADMIN_BAN to ADMIN_KICK everywhere. Some coders use the actual ADMIN_BAN instead of setting up a global variable then using that global to check within each function. So I would suggest doing a search replace. If this is not the case, please post your version of the code so someone can take a gander at it.
Cheers!
I think the issue is more that the setting is still stored in the server's memory. But I figured since I stopped/restarted the server the setting should be adjusted. Do I need to restart the OS or could there be something else the matter? (im not sure if everything is installed as a service and will auto start upon reboot).
#include <amxmodx>
#include <amxmisc>
#include <engine>
new dodevil_stfu[33]
public plugin_init(){
register_plugin("DoD EvilAdmin","0.5beta","AMXX DoD Team")
register_concmd("amx_evilstfu","eviladmin_stfu",ADMIN_KICK,"<player> = Disables VoiceComm/Chat for the target")
register_clcmd("say","check_evilstfu")
register_clcmd("say_team","check_evilstfu")
return PLUGIN_CONTINUE
}
public client_authorized(id){
dodevil_stfu[id] = 0
}
public check_evilstfu(id){
if(dodevil_stfu[id] == 0){
return PLUGIN_CONTINUE
}
else if(dodevil_stfu[id] == 1){
client_print(id,print_chat,"You have been muted by an admin.")
return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}
public evil_stfu(eviltarget){
if(get_speak(eviltarget) != SPEAK_MUTED){
set_speak(eviltarget,SPEAK_MUTED)
return PLUGIN_HANDLED
}
return PLUGIN_HANDLED
}
public eviladmin_stfu(id,level,cid){
if(!cmd_access(id,level,cid,2)){
return PLUGIN_HANDLED
}
new arg[32]
read_argv(1,arg,31)
new eviltarget = cmd_target(id,arg,11)
if(eviltarget == 0){
return PLUGIN_HANDLED
}
new adminname[32]
new eviltargetname[32]
get_user_name(id,adminname,31)
get_user_name(eviltarget,eviltargetname,31)
if(dodevil_stfu[eviltarget] == 0){
dodevil_stfu[eviltarget] = 1
evil_stfu(eviltarget)
client_print(eviltarget,print_chat,"Due to voice/text spam you've been gagged!")
client_print(0,print_chat,"%s: %s, try talking with a #### in your mouth, you've been gagged!",adminname,eviltargetname)
return PLUGIN_HANDLED
}
else if(dodevil_stfu[eviltarget] == 1){
dodevil_stfu[eviltarget] = 0
if(get_speak(eviltarget) != SPEAK_NORMAL){
set_speak(eviltarget,SPEAK_NORMAL)
}
client_print(eviltarget,print_chat,"You can now use voice/text again, don't spam again!")
client_print(0,print_chat,"%s: The #### has been removed from your mouth, %s. Don't spam again!",adminname,eviltargetname)
return PLUGIN_HANDLED
}
return PLUGIN_HANDLED
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1043\\ f0\\ fs16 \n\\ par }
*/
Not sure what it may be, but you could try changing the following:
public eviladmin_stfu(id,level,cid)
{
if(!cmd_access(id,level,cid,2))
{
return PLUGIN_HANDLED
}
...
to this:
public eviladmin_stfu(id)
{
if(!(get_user_flags(id) & ADMIN_KICK))
{
return PLUGIN_HANDLED
}
...
And see what happens. This is basically what the cmd_access does with some other testing.
Cheers!
diamond-optic
10-13-2009, 03:22 PM
it could be the whole pain in the ass cmdaccess.ini file (which i believe is for storing and changing access to commands without having to recompile the plugin if my memory is right)
i think tatsu and a few others have had similar problems... and i believe its fixed by adding this to the core.ini file
//disable cmdaccess.ini crap
disableflagman 1
not sure if thats possibly the issue or what, but you could try that
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.