Day of Defeat Plugins Community
This site is an archive — everything is readable and downloadable, nothing can be posted. Admin
Archive › Old Forum Threads › Help › General Help › Back to basics?
6 posts, 4 people · 823 views Thread Rating: ★★★★★
closedBack to basics?
Started by Tank on 10-13-2009, 05:07 AM
Tank
started this thread
Posts: 581
Threads: 59
Joined: Jan 2007
10-13-2009, 05:07 AM #1

Im using amx_evilstfu posted here linky.rnrnNow 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...rnrnAny idea how to update this?

Zor
posted here
Posts: 688
Threads: 75
Joined: Jun 2006
10-13-2009, 07:04 AM #2

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.rnrnCheers!

Tank
started this thread
Posts: 581
Threads: 59
Joined: Jan 2007
10-13-2009, 10:43 AM #3

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).nn

#include <amxmodx>n#include <amxmisc>n#include <engine>nnnew dodevil_stfu[33]nnpublic plugin_init(){n    register_plugin("DoD EvilAdmin","0.5beta","AMXX DoD Team")n    register_concmd("amx_evilstfu","eviladmin_stfu",ADMIN_KICK,"<player> = Disables VoiceComm/Chat for the target")n    register_clcmd("say","check_evilstfu")n    register_clcmd("say_team","check_evilstfu")n    return PLUGIN_CONTINUEn}nnpublic client_authorized(id){n    dodevil_stfu[id] = 0n}nnnpublic check_evilstfu(id){n    if(dodevil_stfu[id] == 0){n        return PLUGIN_CONTINUEn    }n    else if(dodevil_stfu[id] == 1){n        client_print(id,print_chat,"You have been muted by an admin.")n        return PLUGIN_HANDLEDn    }n    return PLUGIN_CONTINUEn}nnpublic evil_stfu(eviltarget){n    if(get_speak(eviltarget) != SPEAK_MUTED){n        set_speak(eviltarget,SPEAK_MUTED)n        return PLUGIN_HANDLEDn    }n    return PLUGIN_HANDLEDn}nnpublic eviladmin_stfu(id,level,cid){n    if(!cmd_access(id,level,cid,2)){n        return PLUGIN_HANDLEDn    }n    new arg[32]n    read_argv(1,arg,31)n    new eviltarget = cmd_target(id,arg,11)n    if(eviltarget == 0){n        return PLUGIN_HANDLEDn    }n    new adminname[32]n    new eviltargetname[32]n    get_user_name(id,adminname,31)n    get_user_name(eviltarget,eviltargetname,31)n    if(dodevil_stfu[eviltarget] == 0){n        dodevil_stfu[eviltarget] = 1n        evil_stfu(eviltarget)n        client_print(eviltarget,print_chat,"Due to voice/text spam you've been gagged!")n        client_print(0,print_chat,"%s: %s, try talking with a #### in your mouth, you've been gagged!",adminname,eviltargetname)n        return PLUGIN_HANDLEDn    }n    else if(dodevil_stfu[eviltarget] == 1){n        dodevil_stfu[eviltarget] = 0n        if(get_speak(eviltarget) != SPEAK_NORMAL){n            set_speak(eviltarget,SPEAK_NORMAL)n        }n        client_print(eviltarget,print_chat,"You can now use voice/text again, don't spam again!")n        client_print(0,print_chat,"%s: The #### has been removed from your mouth, %s. Don't spam again!",adminname,eviltargetname)n        return PLUGIN_HANDLEDn    }n    return PLUGIN_HANDLEDn}n/* AMXX-Studio Notes - DO NOT MODIFY BELOW HEREn*{\ rtf1\ ansi\ deff0{\ fonttbl{\ f0\ fnil Tahoma;}}
\ viewkind4\ uc1\ pard\ lang1043\ f0\ fs16 
\ par }n*/n
Dr.G
posted here
Posts: 776
Threads: 75
Joined: Nov 2007
10-13-2009, 11:07 AM #4

Does this work?

Zor
posted here
Posts: 688
Threads: 75
Joined: Jun 2006
10-13-2009, 01:06 PM #5

Not sure what it may be, but you could try changing the following:rnrn

rnpublic eviladmin_stfu(id,level,cid)rn{rn    if(!cmd_access(id,level,cid,2))rn    {rn        return PLUGIN_HANDLEDrn    }rn...rn
rnrnto this:rnrnrn
rnpublic eviladmin_stfu(id)rn{rn    if(!(get_user_flags(id) & ADMIN_KICK))rn    {rn        return PLUGIN_HANDLEDrn    }rn...rn
rnrnAnd see what happens. This is basically what the cmd_access does with some other testing.rnrnCheers!

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
10-13-2009, 02:22 PM #6

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)nni think tatsu and a few others have had similar problems... and i believe its fixed by adding this to the core.ini filenn

//disable cmdaccess.ini crapndisableflagman 1
nnnot sure if thats possibly the issue or what, but you could try that

Archive › Old Forum Threads › Help › General Help › Back to basics?
DoD Plugins Archive · Repository · Old Forum Threads · Maps · Admin · built 14 Sep 2026 00:34 UTC