Raised This Month: $51 Target: $400
 12% 

(ignore)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ceegar1
Junior Member
Join Date: Jun 2022
Old 05-28-2023 , 06:08   (ignore)
Reply With Quote #1

ignore

Last edited by ceegar1; 01-21-2024 at 15:23.
ceegar1 is offline
Fraggor
Junior Member
Join Date: Jun 2020
Old 05-28-2023 , 18:48   Re: Request Plugin Block "[Player] is now idle." Message in L4D2
Reply With Quote #2

this is just a stripped down version of bequite plugin by sirplease (all credits goes to them)

PHP Code:
// this is a fork from 'bequite' plugin

#pragma semicolon 1
#pragma newdecls required

#include <sourcemod>

#define PLUGIN_VERSION "1.0.0"

public Plugin myinfo 
{
    
name "[L4D1 & 2] chat message 'idle' blocker",
    
author "Sir, Forgetest",
    
description "Suppress the printing of the chat message '<player-name> is now idle'",
    
version PLUGIN_VERSION,
    
url "-"
}

public 
void OnPluginStart()
{
    
HookUserMessage(GetUserMessageId("TextMsg"), UserMsg_TextMesgtrue);
}

Action UserMsg_TextMesg(UserMsg msg_idBfRead msg, const int[] playersint playersNumbool reliablebool init)
{
    
int client msg.ReadByte();
    if (!
IsValidClient(client))
       return 
Plugin_Continue;

    static 
char sMsg[128];
    
sMsg[0] = 0;
    
msg.ReadString(sMsgsizeof(sMsg), true);

    if (
strcmp(sMsg"#L4D_idle_spectator") == 0)
        return 
Plugin_Handled;

    return 
Plugin_Continue;
}

stock bool IsValidClient(int client)

    return 
client && client <= MaxClients && IsClientInGame(client);

Fraggor is offline
Old 05-29-2023, 15:09
ceegar1
This message has been deleted by ceegar1.
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:30.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode