Guest User

Block commands

a guest
Jul 2nd, 2016
533
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.56 KB | None | 0 0
  1. #pragma semicolon 1
  2. #pragma newdecls required
  3.  
  4. char f_commands[][] = {
  5.     "status",
  6.     "ping",
  7. };
  8.  
  9. public Plugin porno = {
  10.     author = "Hentai",
  11.     name = "Block commands",
  12.     version = "0.0.0.1",
  13.     url = "pornolab.net",
  14. };
  15.  
  16. public void OnPluginStart(){
  17.     for (int i = 0; i < sizeof(f_commands); i++){
  18.         AddCommandListener(listener_commands, f_commands[i]);
  19.     }
  20. }
  21.  
  22. public Action listener_commands(int client, char[] command, int args){
  23.     if (client){
  24.         PrintToConsole(client, "У вас нет прав!");
  25.         return Plugin_Handled;
  26.     }
  27.     return Plugin_Continue;
  28. }
Add Comment
Please, Sign In to add comment