Raised This Month: $ Target: $400
 0% 

[L4D2] Instructor Chat v1.0.3 [4-January-2023]


Post New Thread Reply   
 
Thread Tools Display Modes
NoroHime
Veteran Member
Join Date: Aug 2016
Location: bed
Old 01-01-2023 , 10:50   Re: [L4D2] Instructor Chat v1.0.2 [1-January-2023]
Reply With Quote #11

Quote:
Originally Posted by HarryPotter View Post
Great plugin, hope it helps player notice teammate when I say "HELP!"

I have a question not related to this plugin.
How do you make AI bots chat in your Intro Videos?
PHP Code:
/do Coach "say no Way" 
simple snippets
PHP Code:
public OnPluginStart() {
    
RegAdminCmd ("sm_do"ClientFakeExecADMFLAG_RCON);
}

public 
Action ClientFakeExec(int clientint args)
{
    if (
args 2)
    {
        
ReplyToCommand(client"[SM] Usage: sm_do <#userid|name>");
        return 
Plugin_Handled;
    }

    
char arg[64];
    
GetCmdArg(1argsizeof(arg));

    
char sCommand[128];
    
GetCmdArg (2sCommandsizeof (sCommand));

    if (
arg[0] != '@') {

        
int found = -1;

        if ((
found FindTarget(clientargfalsetrue)) != -1) {
            
FakeClientCommand(foundsCommand);
            
ReplyToCommand(client"%N Excuted: %s"foundsCommand);
        }
    }

    
char target_name[MAX_TARGET_LENGTH];
    
int target_list[MAXPLAYERS+1], target_count;
    
bool tn_is_ml;
    
    if ((
target_count ProcessTargetString(
            
arg,
            
client,
            
target_list,
            
MAXPLAYERS,
            
COMMAND_FILTER_ALIVE,
            
target_name,
            
sizeof(target_name),
            
tn_is_ml)) <= 0)
    {
        
ReplyToTargetError(clienttarget_count);
        return 
Plugin_Handled;
    }

    for (
int i 0target_counti++) {
        if (
IsClient(i)) {
            
FakeClientCommand(target_list[i], sCommand);
            
ReplyToCommand(client"%N Excuted: %s"isCommand);
        }
    }

    return 
Plugin_Handled;
}

bool IsClient(int client) {
    return (
<= client <= MaxClients) && IsClientInGame(client);

__________________
NoroHime is offline
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 01-02-2023 , 10:10   Re: [L4D2] Instructor Chat v1.0.2 [1-January-2023]
Reply With Quote #12

Quote:
Originally Posted by NoroHime View Post
simple snippets
PHP Code:
public OnPluginStart() {
    
RegAdminCmd ("sm_do"ClientFakeExecADMFLAG_RCON);
}

public 
Action ClientFakeExec(int clientint args)
{
    if (
args 2)
    {
        
ReplyToCommand(client"[SM] Usage: sm_do <#userid|name>");
        return 
Plugin_Handled;
    }

    
char arg[64];
    
GetCmdArg(1argsizeof(arg));

    
char sCommand[128];
    
GetCmdArg (2sCommandsizeof (sCommand));

    if (
arg[0] != '@') {

        
int found = -1;

        if ((
found FindTarget(clientargfalsetrue)) != -1) {
            
FakeClientCommand(foundsCommand);
            
ReplyToCommand(client"%N Excuted: %s"foundsCommand);
        }
    }

    
char target_name[MAX_TARGET_LENGTH];
    
int target_list[MAXPLAYERS+1], target_count;
    
bool tn_is_ml;
    
    if ((
target_count ProcessTargetString(
            
arg,
            
client,
            
target_list,
            
MAXPLAYERS,
            
COMMAND_FILTER_ALIVE,
            
target_name,
            
sizeof(target_name),
            
tn_is_ml)) <= 0)
    {
        
ReplyToTargetError(clienttarget_count);
        return 
Plugin_Handled;
    }

    for (
int i 0target_counti++) {
        if (
IsClient(i)) {
            
FakeClientCommand(target_list[i], sCommand);
            
ReplyToCommand(client"%N Excuted: %s"isCommand);
        }
    }

    return 
Plugin_Handled;
}

bool IsClient(int client) {
    return (
<= client <= MaxClients) && IsClientInGame(client);

Thank you.
__________________
HarryPotter is offline
KadabraZz
Senior Member
Join Date: May 2020
Old 01-07-2023 , 20:01   Re: [L4D2] Instructor Chat v1.0.3 [4-January-2023]
Reply With Quote #13

I like that, would it be possible to add an option to do this only in the middle of the screen and not stick to the player who said the message?
KadabraZz is offline
NoroHime
Veteran Member
Join Date: Aug 2016
Location: bed
Old 01-11-2023 , 04:09   Re: [L4D2] Instructor Chat v1.0.3 [4-January-2023]
Reply With Quote #14

Quote:
Originally Posted by KadabraZz View Post
I like that, would it be possible to add an option to do this only in the middle of the screen and not stick to the player who said the message?
Quote:
// instructor flags, 1,2,4=pulse 8,16,32=alpha animating 64,128=shake 256=static.
// add numbers together you want
chat_instruct_flags "0"
this set to 256, will be static on screen

left4dhooks_stocks.inc
PHP Code:
/* Instructor Hint bit flags */
#define L4D2_IHFLAG_NONE                (0 << 0)
#define L4D2_IHFLAG_PULSE_SLOW            (1 << 0)
#define L4D2_IHFLAG_PULSE_FAST            (1 << 1)
#define L4D2_IHFLAG_PULSE_URGENT        (1 << 2)
#define L4D2_IHFLAG_ALPHA_SLOW            (1 << 3)
#define L4D2_IHFLAG_ALPHA_FAST            (1 << 4)
#define L4D2_IHFLAG_ALPHA_URGENT        (1 << 5)
#define L4D2_IHFLAG_SHAKE_NARROW        (1 << 6)
#define L4D2_IHFLAG_SHAKE_WIDE            (1 << 7)
#define L4D2_IHFLAG_STATIC                (1 << 8) 
__________________

Last edited by NoroHime; 01-11-2023 at 04:10.
NoroHime is offline
KadabraZz
Senior Member
Join Date: May 2020
Old 01-12-2023 , 23:21   Re: [L4D2] Instructor Chat v1.0.3 [4-January-2023]
Reply With Quote #15

��*♂️ Thank You!
KadabraZz is offline
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 00:15.


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