Jump to content
News ticker
  • Bienvenue sur le nouveau forum VeryGames
  • Welcome to the new VeryGames forum
  • VeryNews

    Muter les mort chat et micro pour SM


    dume009

    Recommended Posts

    Yop

     

    #include <sdktools>
    
    
    public Plugin:myinfo = 
    {
       name = "Mute Dead",
       author = "Triezone",
       description = "Mute les morts",
       version = "1.0",
       url = "http://vip-magnetik.fr"
    }
    
    
    public OnPluginStart()
    {
       HookEvent("player_spawn", OnPlayerSpawn, EventHookMode_PostNoCopy);
       HookEvent("player_death", OnPlayerDeath, EventHookMode_PostNoCopy);
    }
    
    
    public Action:OnPlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
    {
       new client = GetClientOfUserId(GetEventInt(event, "userid"));
    
       if (GetClientListeningFlags(client) == VOICE_MUTED)
       {
           SetClientListeningFlags(client, VOICE_NORMAL);
       }
    }
    
    
    public Action:OnPlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
    {
       new client = GetClientOfUserId(GetEventInt(event, "userid"));
    
       SetClientListeningFlags(client, VOICE_MUTED);
       PrintToChat(client, "\x04[sERVER] : tu es morts tu es donc muté.");
    }
    

     

    fait a la rache, test le

    Link to comment
    Share on other sites

    Yop

     

    #include <sdktools>
    
    
    public Plugin:myinfo = 
    {
       name = "Mute Dead",
       author = "Triezone",
       description = "Mute les morts",
       version = "1.0",
       url = "http://vip-magnetik.fr"
    }
    
    
    public OnPluginStart()
    {
       HookEvent("player_spawn", OnPlayerSpawn, EventHookMode_PostNoCopy);
       HookEvent("player_death", OnPlayerDeath, EventHookMode_PostNoCopy);
    }
    
    
    public Action:OnPlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
    {
       new client = GetClientOfUserId(GetEventInt(event, "userid"));
    
       if (GetClientListeningFlags(client) == VOICE_MUTED)
       {
           SetClientListeningFlags(client, VOICE_NORMAL);
       }
    }
    
    
    public Action:OnPlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
    {
       new client = GetClientOfUserId(GetEventInt(event, "userid"));
    
       SetClientListeningFlags(client, VOICE_MUTED);
       PrintToChat(client, "\x04[sERVER] : tu es morts tu es donc muté.");
    }
    

     

    fait a la rache, test le

    Je lui donne quelle nom?

    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.

    ×
    ×
    • Create New...