Thread: move to trash
View Single Post
CliptonHeist
Senior Member
Join Date: Feb 2016
Old 07-21-2019 , 19:41   Re: No perm no chat
Reply With Quote #6

A bit ugly but should work:
PHP Code:
public void OnPluginStart() 

    
AddCommandListener(Listener_Say"say"); 
    
AddCommandListener(Listener_Say"say_team"); 


public 
Action Listener_Say(int Client, const char[] sCommandint iArgs

    if(
Client <= || Client MaxClients || !IsClientInGame(Client)) return Plugin_Handled

    if(!
CheckCommandAccess(Client"sm_somethingsomething"ADMFLAG_RESERVATION) || !CheckCommandAccess(Client"sm_somethingsomething"ADMFLAG_VOTE) || !CheckCommandAccess(Client"sm_somethingsomething"ADMFLAG_KICK)) 
    { 
        
PrintToChat(Client"[SM] You cannot use the message box because you do not have permission"); 
        return 
Plugin_Handled
    } 

    return 
Plugin_Continue

CliptonHeist is offline