Raised This Month: $ Target: $400
 0% 

[L4D & L4D2] Survivor Bot Takeover v0.8


Post New Thread Reply   
 
Thread Tools Display Modes
muukis
Veteran Member
Join Date: Apr 2009
Old 09-24-2013 , 02:13   Re: [L4D & L4D2] Survivor Bot Takeover v0.8
Reply With Quote #131

Quote:
Originally Posted by probably2000 View Post
Hi,sir,I am using this plugin and its very helpful,thank u very much.but here is another problem hope u can see it.when i play a 8 players coop game ,i always find we were born not in the safe room but somewhere weird in the map . I mean we should stay in saferoom before the game start ,but we always in other place in the map sometimes in bug.So could i ask u to see this problem and help make a plugin that makes sure all players born in saferooom before game start.could u ?thank u anyway.
Hello,

The plugin was supposed to allow an incapacitated or dead player to take control of a living NPC. The "take control" should not be possible, unless there is a living NPC available. If your server for some reason allows the "taking control", it must be because there is a living NPC available or some other plugin ghosts one (or more) for some reason? I'd like to help, but I don't have time to install an environment like yours, so that I can debug it and find the reason. Sorry!
__________________
Monster Hunter

Though certainly not superhuman, the man's prowess inspires an excess of whispered rumors. But those rumors remain in the realm of speculation.
muukis is offline
MasterMe
Member
Join Date: Mar 2010
Location: Netherlands
Old 04-13-2014 , 11:32   Re: [L4D & L4D2] Survivor Bot Takeover v0.8
Reply With Quote #132

Hi,

I added a cvar to allow players to !takeover when alive (not incapped).
By default this setting is OFF.

I also renamed the plugin to l4d_takeover.smx, so don't forget to remove the original plugin if you decide to use this one.

muukis, feel free to add this to the main plugin if you like it. Although the code could probably a bit more efficient than it is now.

Enjoy,

MasterMe.
Attached Files
File Type: sp Get Plugin or Get Source (l4d_takeover.sp - 1121 views - 24.2 KB)
__________________
MasterMe is offline
paul92
Senior Member
Join Date: Sep 2010
Old 04-19-2014 , 11:15   Re: [L4D & L4D2] Survivor Bot Takeover v0.8
Reply With Quote #133

Quote:
Originally Posted by MasterMe View Post
Hi,

I added a cvar to allow players to !takeover when alive (not incapped).
By default this setting is OFF.

I also renamed the plugin to l4d_takeover.smx, so don't forget to remove the original plugin if you decide to use this one.

muukis, feel free to add this to the main plugin if you like it. Although the code could probably a bit more efficient than it is now.

Enjoy,

MasterMe.
Ehy MasterMe!
I'm using your edited plugin, but there is a recurring error that spam my logs (and it "might" be the cause of the crashes of my server)

Code:
04/19/2014 - 01:46:03: [SM] Native "GetClientTeam" reported: Client 6 is not in game
L 04/19/2014 - 01:46:03: [SM] Displaying call stack trace for plugin "l4d_takeover.smx":
L 04/19/2014 - 01:46:03: [SM]   [0]  Line 869, /home/groups/alliedmodders/forums/files/7/2/0/9/8/132615.attach::TOIsClientInTeam()
L 04/19/2014 - 01:46:03: [SM]   [1]  Line 317, /home/groups/alliedmodders/forums/files/7/2/0/9/8/132615.attach::event_PlayerDeath()
04/19/2014 - 01:46:05: [SM] Native "GetClientTeam" reported: Client 6 is not in game
L 04/19/2014 - 01:46:05: [SM] Displaying call stack trace for plugin "l4d_takeover.smx":
L 04/19/2014 - 01:46:05: [SM]   [0]  Line 869, /home/groups/alliedmodders/forums/files/7/2/0/9/8/132615.attach::TOIsClientInTeam()
L 04/19/2014 - 01:46:05: [SM]   [1]  Line 317, /home/groups/alliedmodders/forums/files/7/2/0/9/8/132615.attach::event_PlayerDeath()
04/19/2014 - 01:46:05: [SM] Native "GetClientTeam" reported: Client 6 is not in game
L 04/19/2014 - 01:46:05: [SM] Displaying call stack trace for plugin "l4d_takeover.smx":
L 04/19/2014 - 01:46:05: [SM]   [0]  Line 869, /home/groups/alliedmodders/forums/files/7/2/0/9/8/132615.attach::TOIsClientInTeam()
L 04/19/2014 - 01:46:05: [SM]   [1]  Line 317, /home/groups/alliedmodders/forums/files/7/2/0/9/8/132615.attach::event_PlayerDeath()
I tried to look into it, and it looks like you need to validate the client.

I made this:
Code:
public IsValidClient (client)
{
    if (client == 0)
        return false;
    
    if (!IsClientConnected(client))
        return false;
    
    if (IsFakeClient(client))
        return false;
    
    if (!IsClientInGame(client))
        return false;    
        
    return true;
}
But now i'm stuck on where to put the "IsValidClient" in your code.

Could you fix it, please?

Last edited by paul92; 04-19-2014 at 11:18.
paul92 is offline
MasterMe
Member
Join Date: Mar 2010
Location: Netherlands
Old 05-04-2014 , 08:21   Re: [L4D & L4D2] Survivor Bot Takeover v0.8
Reply With Quote #134

Quote:
Originally Posted by paul92 View Post
...snip...
I looked into this and I was pretty sure I replied, but somehow I managed to not reply.
The plugin itself already does validation (the "regular", non-edited version too) so I don't think there's a need to do this manually.

I have no issues here at alll so this is pretty weird.

Check if you haven't got "takeover.smx" and "l4d_takeover.smx", and if it's not that I really think another add-on is conflicting. Check if you still get this issue when you disable the others for a second.

I had a few issues with this plugin too, but it was due to a 5+ player coop bugfix plugin. Disabling it fixed everything.

Let me know if you can't get it to work.
__________________
MasterMe is offline
eric0279
AlliedModders Donor
Join Date: May 2007
Old 05-14-2014 , 20:30   Re: [L4D & L4D2] Survivor Bot Takeover v0.8
Reply With Quote #135

Hello,

Code:
// This file was auto-generated by SourceMod (v1.6.0-dev+4284)
// ConVars for plugin "takeover.smx"


// Execute a takeover automatically when a player dies. Enabling this will disable the takeover voting.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_takeover_autodeath "0"

// Execute a takeover automatically when a player incaps.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_takeover_autoincap "0"

// Time to cast a takeover choice.
// -
// Default: "10"
// Minimum: "10.000000"
// Maximum: "60.000000"
l4d_takeover_choosingtime "10"

// Delay after a possible takeover is found and before showing any panels to anyone.
// -
// Default: "5"
// Minimum: "0.000000"
l4d_takeover_delay "5"

// Display the bot name when a takeover executes.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_takeover_displaybotname "1"

// Allow takeovers only in finale maps.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_takeover_finaleonly "0"

// Allow dead survivor players to execute console command "sm_takeover" to takeover a survivor bot.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_takeover_manual "1"

// Allow incapped survivor players to execute console command "sm_takeover" to takeover a survivor bot.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_takeover_manualincap "0"

// Request confirmation from the player before executing a takeover.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_takeover_requestconf "0"

// Initiate a vote for a takeover when a player dies.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_takeover_votingenabled "0"

// Time to cast a takeover vote.
// -
// Default: "20"
// Minimum: "10.000000"
// Maximum: "60.000000"
l4d_takeover_votingtime "20"
with this configuration, takeover runs automatically when a player is dead.

This is not supposed to allow only dead players performed sm_takeover?
eric0279 is offline
muukis
Veteran Member
Join Date: Apr 2009
Old 05-15-2014 , 02:01   Re: [L4D & L4D2] Survivor Bot Takeover v0.8
Reply With Quote #136

Quote:
Originally Posted by eric0279 View Post
Hello,

Code:
// This file was auto-generated by SourceMod (v1.6.0-dev+4284)
// ConVars for plugin "takeover.smx"


// Execute a takeover automatically when a player dies. Enabling this will disable the takeover voting.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_takeover_autodeath "0"

// Execute a takeover automatically when a player incaps.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_takeover_autoincap "0"

// Time to cast a takeover choice.
// -
// Default: "10"
// Minimum: "10.000000"
// Maximum: "60.000000"
l4d_takeover_choosingtime "10"

// Delay after a possible takeover is found and before showing any panels to anyone.
// -
// Default: "5"
// Minimum: "0.000000"
l4d_takeover_delay "5"

// Display the bot name when a takeover executes.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_takeover_displaybotname "1"

// Allow takeovers only in finale maps.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_takeover_finaleonly "0"

// Allow dead survivor players to execute console command "sm_takeover" to takeover a survivor bot.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_takeover_manual "1"

// Allow incapped survivor players to execute console command "sm_takeover" to takeover a survivor bot.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_takeover_manualincap "0"

// Request confirmation from the player before executing a takeover.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_takeover_requestconf "0"

// Initiate a vote for a takeover when a player dies.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_takeover_votingenabled "0"

// Time to cast a takeover vote.
// -
// Default: "20"
// Minimum: "10.000000"
// Maximum: "60.000000"
l4d_takeover_votingtime "20"
with this configuration, takeover runs automatically when a player is dead.

This is not supposed to allow only dead players performed sm_takeover?
That is strange. It looks you have all the default values set and it still takes over automatically. When I last ran the plugin, this was not how it behaved. My guess is that either you have another plugin that brakes takeover plugin or an update to the server has broken takeover plugin. Can anyone verify how the plugin works in their server?
__________________
Monster Hunter

Though certainly not superhuman, the man's prowess inspires an excess of whispered rumors. But those rumors remain in the realm of speculation.
muukis is offline
muukis
Veteran Member
Join Date: Apr 2009
Old 05-15-2014 , 02:03   Re: [L4D & L4D2] Survivor Bot Takeover v0.8
Reply With Quote #137

Quote:
Originally Posted by MasterMe View Post
Hi,

I added a cvar to allow players to !takeover when alive (not incapped).
By default this setting is OFF.

I also renamed the plugin to l4d_takeover.smx, so don't forget to remove the original plugin if you decide to use this one.

muukis, feel free to add this to the main plugin if you like it. Although the code could probably a bit more efficient than it is now.

Enjoy,

MasterMe.
Thanks! It looks OK and I would love to add it to the "official plugin", but before I have not tested it I can't.
__________________
Monster Hunter

Though certainly not superhuman, the man's prowess inspires an excess of whispered rumors. But those rumors remain in the realm of speculation.
muukis is offline
eric0279
AlliedModders Donor
Join Date: May 2007
Old 05-15-2014 , 09:23   Re: [L4D & L4D2] Survivor Bot Takeover v0.8
Reply With Quote #138

hmm:
Quote:
#define PLUGIN_VERSION "0.8"
it's latest version?

I changed the variables:
cvar_TOChoosingTime (default: 20) set to 10
cvar_TODeath (default: 1) set to 0

edit:
I just tested without any plugin but Coop and I have not managed to reproduce the bug, I'm dead and the plugin does nothing as expected

Last edited by eric0279; 05-15-2014 at 09:55.
eric0279 is offline
arrowghost
New Member
Join Date: Jun 2014
Old 07-23-2014 , 13:41   Re: [L4D & L4D2] Survivor Bot Takeover v0.8
Reply With Quote #139

Hi, I'm new to Sourcemod. I managed to get it to work on Dedicated Server, also managed to launch L4D1 campaigns too which cannot be accessed via the default menu given. Sorry for not being able to catch up as I had trouble understanding the installation until managed to do it right via some Youtube videos. Please bear with me for being a newb.

But how's the plugin going to work? I tried it, even after leaving the safe room, sm_takeover or l4d_takeover commands all don't work due to "Unknown Command" response. I copied the plugins into the Plugins folder, that TXT file in the gamedata folder too.

sb_takecontrol requires sv_cheats 1 but which will disable the achievements. So... what did I do wrong?
Is it possible if you can select a survivor before starting the campaign or even before leaving the 1st level's safe room. I remember a plugin called "Improved Bot (Advanced)", but according to the author, it's not advisable unless I use the "Improved Bot (Simple)", but I too recall when tempering with the Bots also results in cheats automatically turned on and disabled the achievements.

Can you help? I also love this plugin.

Last edited by arrowghost; 07-23-2014 at 13:44.
arrowghost is offline
Munch
Senior Member
Join Date: May 2012
Location: Liverpool UK
Old 07-23-2014 , 14:51   Re: [L4D & L4D2] Survivor Bot Takeover v0.8
Reply With Quote #140

In the event you are incapped type !takeover in the chat or bind to a key to take control of another bot
In the event you are dead you will be prompted to take control of a another bot

If you downloaded the files from post 1 the gamedata.txt will be out of date try this version
https://forums.alliedmods.net/showpo...&postcount=123

If you want to choose another character then you have the wrong plugin.
__________________
Dead Men Fighting L4D2 8 Man Dead Men Fighting UK
Munch 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 19:24.


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