AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D/L4D2] VS Bug Fix (https://forums.alliedmods.net/showthread.php?t=126940)

Pescoxa 05-15-2010 12:05

[L4D/L4D2] VS Bug Fix
 
3 Attachment(s)
This plugin handles the game in some game modes to change some cvars.

Sometimes the game starts and the bots start the game before the players get in! This plugin freezes the bots (survivor and infected) until a human player get in and left the safe area. When this occours, the bots start moving.

It allows you play versus mode without survivor players and does not close the game (sb_all_bot_team [L4D] and sb_all_bot_game [L4D2]).

Hooks: mp_gamemode, sb_stop, sb_all_bot_team or sb_all_bot_game, director_ready_duration (how it works?), nb_stop and director_no_mobs.

Command: sm_unfreezebots (force to restore AI)

When the round starts, all AI is disabled and it starts working again when a human player left the safe area. While the survivors are in the safe (without get out sometime) the will have the God Mode enabled.

I've been testing this plugin since version 0.1. I changed it a lot and now, in the current version, I think it's OK!

Let me know if it actually works!

* I changed some events that skrewed up the plugin, but I found the solution in another plugin, then I'll replicate it to this plugin. - FIXED *

* NEW VERSION IS OUT!!! 2.9.3 *

Changelog:

* 2.9.3
- sb_all_bot_team to L4D and to sb_all_bot_game to L4D2;
- Russian language added;

* 2.9.2
- sb_all_bot_team to sb_all_bot_game;

* 2.9.1
- All modes are handled;

* 2.9
- Translation: pt-br and us-en;
- Some Bug fixes about god mode;
- Code Review;

* 2.8
- Initial public release.

TODO:

- Nothing

le0n_ 11-14-2010 15:52

Re: [L4D/L4D2] VS Bug Fix
 
sry but my english is not very good , i am not shure how to make this to work.
Because i again see server shut down , if i w8 try to play only with bots or w8 2 min and server shut down

Galaxy9000 11-21-2010 07:00

Re: [L4D/L4D2] VS Bug Fix
 
Quote:

Originally Posted by le0n_ (Post 1349503)
sry but my english is not very good , i am not shure how to make this to work.
Because i again see server shut down , if i w8 try to play only with bots or w8 2 min and server shut down

Check your server.cfg also for the cvar "sb_all_bot_team", does it have 1?!

MON@H Rasta 01-03-2011 15:32

Re: [L4D/L4D2] VS Bug Fix
 
Have error (((
Code:

L 01/03/2011 - 22:30:54: [SM] Native "SetConVarInt" reported: Invalid convar handle 0 (error 4)
L 01/03/2011 - 22:30:54: [SM] Displaying call stack trace for plugin "l4d_sm_vsbugfix.smx":
L 01/03/2011 - 22:30:54: [SM]  [0]  Line 73, l4d_sm_vsbugfix.sp::Init()
L 01/03/2011 - 22:30:54: [SM]  [1]  Line 296, l4d_sm_vsbugfix.sp::Event_Round_Start()

I've translated l4d_sm_vsbugfix.phrases.txt to Russian. Here it is:

Code:

"Phrases"
{
        //""Normal \x01
        //""Verde \x03
        //""Amarelo \x04
        //""Verde \x05
       
        "BOTsAreUnfrozen"
        {
                "en"                "BOTs are unfrozen."
                "pt"                "BOTs estão descongelados."
                "ru"                "БОТы разморожены."
        }
       
        "GodOn"
        {
                "en"                "You had God Mode turned on."
                "pt"                "Você teve o modo Deus ativado."
                "ru"                "Вы включили режим Бога."
        }
       
        "GodOff"
        {
                "en"                "You had God Mode turned off."
                "pt"                "Você teve o modo Deus desativado."
                "ru"                "Вы отключили режим Бога."
        }
       
}


le0n_ 01-24-2011 16:33

Re: [L4D/L4D2] VS Bug Fix
 
this not work on me
pls help
im not shure what is cvar
i paste this comand in my server.cfg
sm_unfreezebots
sb_all_bot_team
but still not work
[IMG]http://img405.**************/img405/4005/fullerrorversus.jpg[/IMG]

Pescoxa 02-03-2011 10:41

Re: [L4D/L4D2] VS Bug Fix
 
Quote:

Originally Posted by MON@H Rasta (Post 1385371)
Have error (((
Code:

L 01/03/2011 - 22:30:54: [SM] Native "SetConVarInt" reported: Invalid convar handle 0 (error 4)
L 01/03/2011 - 22:30:54: [SM] Displaying call stack trace for plugin "l4d_sm_vsbugfix.smx":
L 01/03/2011 - 22:30:54: [SM]  [0]  Line 73, l4d_sm_vsbugfix.sp::Init()
L 01/03/2011 - 22:30:54: [SM]  [1]  Line 296, l4d_sm_vsbugfix.sp::Event_Round_Start()

I've translated l4d_sm_vsbugfix.phrases.txt to Russian. Here it is:

Code:

"Phrases"
{
        //""Normal \x01
        //""Verde \x03
        //""Amarelo \x04
        //""Verde \x05
       
        "BOTsAreUnfrozen"
        {
                "en"                "BOTs are unfrozen."
                "pt"                "BOTs estão descongelados."
                "ru"                "БОТы разморожены."
        }
       
        "GodOn"
        {
                "en"                "You had God Mode turned on."
                "pt"                "Você teve o modo Deus ativado."
                "ru"                "Вы включили режим Бога."
        }
       
        "GodOff"
        {
                "en"                "You had God Mode turned off."
                "pt"                "Você teve o modo Deus desativado."
                "ru"                "Вы отключили режим Бога."
        }
       
}


The error is in the line:

SetConVarInt(FindConVar("sb_all_bot_team"), 0);

That means:

FindConVar("sb_all_bot_team") returned 0.

Possible cause:

L4D/L4D2 ConVar "sb_all_bot_team" doesn't exist anymore in newer versions of the game.

Possible solution:

Just comment this line (with "//") and other with the same ConVar "sb_all_bot_team" or try to find a new ConVar that does the same thing.

I can't fix it for now...

Pescoxa 02-03-2011 10:48

Re: [L4D/L4D2] VS Bug Fix
 
Quote:

Originally Posted by le0n_ (Post 1398587)
this not work on me
pls help
im not shure what is cvar
i paste this comand in my server.cfg
sm_unfreezebots
sb_all_bot_team
but still not work
[IMG]http://img405.**************/img405/4005/fullerrorversus.jpg[/IMG]

You don't have to change your server.cfg

sm_unfreezebots is a command that you can run in console typing "sm_unfreezebots" or in the chat window typing "!unfreezebots". You need to be a server admin to run this command. If you can run "sm_admin" or "!admin", you can run "sm_unfreezebots".

This plugin freezes all bots while you are in the safe area... If you left it, game runs as defaults, but closing if there's only one team in game.

Silvers 02-03-2011 13:07

Re: [L4D/L4D2] VS Bug Fix
 
Pescoxa: did you even read is reply or screenshot?

sb_all_bot_team is no longer valid in L4D2 it's been changed to sb_all_bot_game thats why it's not working.

Pescoxa 02-03-2011 14:01

Re: [L4D/L4D2] VS Bug Fix
 
Silvers:

What did you mean?

I'll change the source code...

Silvers 02-03-2011 14:21

Re: [L4D/L4D2] VS Bug Fix
 
sb_all_bot_team - Works as normal for L4D1.
sb_all_bot_game - Is the new command for L4D2 (since the above was removed by Valve due to some bugs)


All times are GMT -4. The time now is 14:09.

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