Raised This Month: $32 Target: $400
 8% 

[L4D2] Colored survivor bots


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
insobniut2004
Member
Join Date: Feb 2022
Old 07-13-2022 , 19:25   [L4D2] Colored survivor bots
Reply With Quote #1

Is there a plugin that puts colors to the surviving bots?
also that varies
insobniut2004 is offline
alasfourom
Senior Member
Join Date: Feb 2022
Location: Saudi Arabia
Old 07-14-2022 , 02:04   Re: [L4D2] Colored survivor bots
Reply With Quote #2

Menu List To Pick Bots Color:

"sm_colorbots" or "sm_botscolor"
I followed the Same Concept, but I checked it for bots + added random colors which can give different colors to different bots


You can add more color by the same concept, good luck

Last edited by alasfourom; 07-18-2022 at 06:54.
alasfourom is offline
insobniut2004
Member
Join Date: Feb 2022
Old 07-14-2022 , 08:52   Re: [L4D2] Colored survivor bots
Reply With Quote #3

nice, bots infecteds?
insobniut2004 is offline
alasfourom
Senior Member
Join Date: Feb 2022
Location: Saudi Arabia
Old 07-14-2022 , 09:45   Re: [L4D2] Colored survivor bots
Reply With Quote #4

use

PHP Code:
stock bool IsInfected (int client)
{
    return (
GetClientTeam(client) == 3);



Then check it, like in this line here

PHP Code:
else if(StrEqual(item_name"RED") && IsClientInGame(i) && IsSurvivor(i)) 
replace it with
PHP Code:
Isinfected(i
like this > so it will affects only infected bots
PHP Code:
else if(StrEqual(item_name"RED") && IsClientInGame(i) && Isinfected(i)) 
or totally remove it so it will affects all bots (survivors and infected)
PHP Code:
else if(StrEqual(item_name"RED") && IsClientInGame(i)) 

depends on what u need, so I'm not sure what exactly u want to do

Last edited by alasfourom; 07-14-2022 at 09:49.
alasfourom is offline
user2000
Member
Join Date: Nov 2015
Location: Peru - Lima
Old 07-14-2022 , 09:59   Re: [L4D2] Colored survivor bots
Reply With Quote #5

Quote:
Originally Posted by insobniut2004 View Post
nice, bots infecteds?
https://forums.alliedmods.net/showthread.php?p=2780746
user2000 is offline
alasfourom
Senior Member
Join Date: Feb 2022
Location: Saudi Arabia
Old 07-14-2022 , 15:32   Re: [L4D2] Colored survivor bots
Reply With Quote #6

This will change all bots color

Last edited by alasfourom; 07-18-2022 at 06:54.
alasfourom is offline
insobniut2004
Member
Join Date: Feb 2022
Old 07-14-2022 , 16:06   Re: [L4D2] Colored survivor bots
Reply With Quote #7

nice work alasfourom
insobniut2004 is offline
alasfourom
Senior Member
Join Date: Feb 2022
Location: Saudi Arabia
Old 07-17-2022 , 07:04   Re: [L4D2] Colored survivor bots
Reply With Quote #8

I made this plugin, which I don't think its the best written script,


Anyway, this can change players skin color, and their aura


I know there are plugins else where, but there is only 1 plugin that change your aura "This One" which can directly change it throw a menu, but it didn't work for me, the aura changes for like 2 seconds then fade away.


So I made this one which can both change your aura + skin color with a menu
Aura is disabled for infected since survivors can see their auras and easily kill them


Commands:
- "sm_color" or "sm_colors" > change your skin color
- "sm_aura" or "sm_auras" > change your aura

Last edited by alasfourom; 07-18-2022 at 06:54.
alasfourom is offline
insobniut2004
Member
Join Date: Feb 2022
Old 07-18-2022 , 15:46   Re: [L4D2] Colored survivor bots
Reply With Quote #9

I would like the bots to have colors without the need to use commands.
insobniut2004 is offline
alasfourom
Senior Member
Join Date: Feb 2022
Location: Saudi Arabia
Old 07-19-2022 , 22:12   Re: [L4D2] Colored survivor bots
Reply With Quote #10

Try This Which Should Give Bots Random Color Once a Bot Spawned
PHP Code:
public void OnPluginStart() 
{
    
HookEvent("player_spawn"OnPlayerSpawn);
}

public 
Action OnPlayerSpawn(Handle event, const char[] event_namebool dontBroadcast)
{
    
int client GetClientOfUserId(GetEventInt(event"userid"));
    if (
IsClientInGame(client) && IsFakeClient(client))
    {
        
int color GetRandomInt(112);
        switch (
color)
        {
            case 
1:
            {
                
SetEntityRenderColor(client02550255);
            }
            case 
2:
            {
                
SetEntityRenderColor(client25500255);
            }
            case 
3:
            {
                
SetEntityRenderColor(client00255255);
            }
            case 
4:
            {
                
SetEntityRenderColor(client2552150255);
            }
            case 
5:
            {
                
SetEntityRenderColor(client000255);
            }
            case 
6:
            {
                
SetEntityRenderColor(client0255255255);
            }
            case 
7:
            {
                
SetEntityRenderColor(client64224208255);
            }
            case 
8:
            {
                
SetEntityRenderColor(client0191255255);
            }
            case 
9:
            {
                
SetEntityRenderColor(client30144255255);
            }
            case 
10:
            {
                
SetEntityRenderColor(client2552550255);
            }
            case 
11:
            {
                
SetEntityRenderColor(client255105180255);
            }
            case 
12:
            {
                
SetEntityRenderColor(client1280128255);
            }
        }
    }
    return 
Plugin_Handled;


Last edited by alasfourom; 07-19-2022 at 22:25.
alasfourom is offline
Reply


Thread Tools
Display Modes

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 01:00.


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