Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
News ticker
  • Bienvenue sur le nouveau forum VeryGames
  • Welcome to the new VeryGames forum
  • VeryNews

    [RECHERCHE] Restreindre une commande


    Shoker
     Share

    Recommended Posts

    tu devra recreer toute les commande

    Par exemple

    #include <sourcemod>
    
    public OnPluginStart()
    {
       RegConsoleCmd("sm_slay", Command_Slay);
    }
    
    public Action:Command_Slay(client, args)
    {
       if(GetUserFlagBits(client) & ADMFLAG_ROOT)
       {
           //Code Slay
       }
       else
       {
           PrintToChat(client, "[sM] Vous n'avez pas accès à cette commande.");
       }
    }

    Link to comment
    Share on other sites

    C'est déjà intégré à sourcemod.

    Il faut éditer le fichier configs/admin_overrides.cfg

    Exemple :

    Overrides
    {
       "sm_map"    "k"    //Change "sm_map" to the "k" flag.
       "@CSDM"        "m"    //Change all CSDM commands to the "m" flag.
       "sm_chat"    ""    //Allow anyone to use "sm_chat"
    [color=#000000][font=monospace]}
    [/font][/color]

    https://wiki.alliedmods.net/Overriding_Command_Access_(SourceMod)

    Link to comment
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Reply to this topic...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

     Share

    ×
    ×
    • Create New...