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

[L4D2] Pause


Post New Thread Reply   
 
Thread Tools Display Modes
basktfbb
Member
Join Date: Feb 2010
Old 02-03-2010 , 06:09   Re: [L4D2] Pause
Reply With Quote #31

Alltalk is only on the !pause? or !forcepause also work?
I tryed !forcepause bot dont work

L 02/03/2010 - 085:06: [basecommands.smx] "Console<0>" changed cvar (cvar "l4d2pause_alltalk") (value "1")
[SM] Changed cvar "l4d2pause_alltalk" to "1".
basktfbb is offline
dirka_dirka
Veteran Member
Join Date: Nov 2009
Old 02-04-2010 , 01:33   Re: [L4D2] Pause
Reply With Quote #32

i modified this plugin to make it compatible with others that dont play nice during a pause... eg: afk manager will still kick people.

the modification does nothing to how this plugin functions:

PHP Code:
new Handle:g_hPaused;

public 
OnPluginStart()
{
    
g_hPaused CreateConVar("l4d2pause_enabled""0""Game is paused (for other plugins to detect)."FCVAR_PLUGINtrue0.0true1.0);
}

public 
OnMapEnd()
{
        
/* inside the if statement */
        
SetConVarInt(g_hPaused0);
}

public 
Action:Command_Setpause(clientargs)
{
        
/* inside the if statement */
        
SetConVarInt(g_hPaused1);
}

public 
Action:Command_Unpause(clientargs)
{
        
/* inside the if statement */
        
SetConVarInt(g_hPaused0);

Attached Files
File Type: smx l4d2pause.smx (6.8 KB, 164 views)
File Type: sp Get Plugin or Get Source (l4d2pause.sp - 585 views - 14.1 KB)
dirka_dirka is offline
JackieChan
AlliedModders Donor
Join Date: Nov 2009
Old 02-12-2010 , 06:29   Re: [L4D2] Pause
Reply With Quote #33

I think the newest update broke this plugin.
JackieChan is offline
basktfbb
Member
Join Date: Feb 2010
Old 02-12-2010 , 13:15   Re: [L4D2] Pause
Reply With Quote #34

pause or forcepause dosent torn on the alltalk even in "l4d2pause_alltalk 1"
basktfbb is offline
-999-
SourceMod Donor
Join Date: May 2009
Location: IA
Old 02-15-2010 , 14:13   Re: [L4D2] Pause
Reply With Quote #35

I don't know when alltalk stopped working as I just turned it on to try it, but you're right it doesn't work atm.

I've gotten it so with this plugin people who disconnect are removed from the board and those that connect are able to during a pause with a short unpause/repause. I was wondering if anyone knew of a way to have a short unpause/repause when someone tries to pick a team? That way when the game's unpaused we don't have a delay for someone to pick a team and take over a bot.
-999- is offline
triggerman
Senior Member
Join Date: Jun 2009
Old 03-21-2010 , 01:18   Re: [L4D2] Pause
Reply With Quote #36

plugin has stopped working for Left 4 Dead 1. can anyone fix it?
__________________
triggerman is offline
n3wton
Senior Member
Join Date: Mar 2010
Old 03-25-2010 , 19:57   Re: [L4D2] Pause
Reply With Quote #37

yer alltalk doesnt work. But from reading through the sourcecode i've noticed that...

1 - It uses setcvarint and sets it to 1 or 0, where technically it should use a bool (probably makes no difference what so ever)

2 - The game is paused and then alltalk is enabled, good in theory, but i'm guessing (just guessing) that when it's paused changing a cvar wont be updated till its unpaused, but when you unpause it sets alltalk back to 0 (false). so therefor during pause alltalk wont be enabled.

Thats my opinion anyways, so i've changed the 2 things so that it uses bools instead of ints, and that it turns on alltalk and then pauses. but all my friends have gone to sleep so I cant test it untill tomorrow, I'll post if it fixed the alltalk problem or not

Yours
N3wton
n3wton is offline
-999-
SourceMod Donor
Join Date: May 2009
Location: IA
Old 03-31-2010 , 01:14   Re: [L4D2] Pause
Reply With Quote #38

Yep that was it. In case n3wton doesn't get back to posting, this version has both alltalk working as well as timers for when people leave/connect to quickly unpause/repause for it.
Attached Files
File Type: sp Get Plugin or Get Source (l4d2pause.sp - 542 views - 14.3 KB)
-999- is offline
bakentake
Junior Member
Join Date: Aug 2009
Old 03-31-2010 , 02:14   Re: [L4D2] Pause
Reply With Quote #39

Just tried the alltalk after updating to the new one posted above and still doesn't work. Could it be that snarespeaks end of round alltalk cancels it out?

And Flood limits, people can only type 3-4 messages then everybody hits the flood limit and can't talk anymore? Any way to solve that?
bakentake is offline
n3wton
Senior Member
Join Date: Mar 2010
Old 03-31-2010 , 06:29   Re: [L4D2] Pause
Reply With Quote #40

sorry for not getting back stupid university work! (*shakes fist*). anyways, yer changing the position of where it turns all talk on does fix it... sometimes, I've played some games where it works everytime you pause, some games where half the games all talk works, and some games not at all... it's really wierd! I was thinking maybe. Turn all talk on set like a 2 - 3 second timer, then pause on the timer giving the server time to update, but this would mean alltalk would turn on like a second before pausing.

As for server flooding this is easy to fix, you can either add it to the plugin or (like me) change the flood cvar globally so noone ever floods the chat.
The chat flod cvar is located in cfg/sourcemod/sourcemod.cfg and looks something like this...

Quote:
// Specifies the amount of time that is allowed between chat messages. This
// includes the say and say_team commands. If a client sends a message faster
// than this time, they receive a flood token. When the client has accumulated
// 3 or more tokens, a warning message is shown instead of the chat message.
// --
// Requires: antiflood.smx
// Default: 0.75
sm_flood_time 0.75
So just either hook it in the plugin and set it to 0.01 or change that value to 0.01 and people can never ever flood.

p.s. -999- nice work on getting the join and leave timers in, I've been playing with them but there always a little buggy

Update

Ok I still havnt got all talk 100% working, but I've added flood changing so it now lowers it to stop the annoying "you are flooding the chat" message.
and also I added another little hook to help with -999-'s joining code, basically his code worked perfect but left you in spectator, I simply hooked the player_team command so it puts you in your correct team fully loaded

I'll hopefully look into alltalk sometime later today.

EDIT 1:
Just relised, I added another cvar, which turns chat flooding on or off, you'll need to delete the l4d2pause.cfg in your cfg/sourcemod/ folder for it to work, by default its set to be on.


FINAL UPDATE HONEST:

Ok, I've added a 1 second timer between the time it turns alltalk on and the time it pauses, I've done a quick test in versus with one other person and it worked YEY

so I've reuploaded the source code in this post.
i've also included the .cfg file so you can just replace it and have everything set up

Yours
N3wton
Attached Files
File Type: sp Get Plugin or Get Source (l4d2pause.sp - 566 views - 15.6 KB)
File Type: cfg l4d2pause.cfg (809 Bytes, 187 views)

Last edited by n3wton; 03-31-2010 at 17:48.
n3wton 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 17:34.


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