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

[HL2DM] Pause protect


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Anhil
Member
Join Date: Jan 2011
Plugin ID:
2213
Plugin Version:
1.01
Plugin Category:
Technical/Development
Plugin Game:
Half-Life 2 Deathmatch
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Protects server from those guys who pauses and leaves server.
    Old 02-05-2011 , 18:10   [HL2DM] Pause protect
    Reply With Quote #1

    Description:
    Protects server from those guys who pauses and leaves server. It automatically changes map.

    Cvars/commands:
    There're no cvars and commands.

    How to install:
    Click on "get plugin" and put .smx file into /addons/sourcemod/plugins/ directory of your server. ("_withchecking" checks for sv_pausable's value)

    Credits:
    Thanks to RapHero for his idea.

    Changelog:
    Code:
    Version 1.01: February 18th, 2011
    - Checks if sm_nextmap is not empty and valid map.
    
    Version 1.0: February 6th, 2011
    - Release.
    Attached Files
    File Type: sp Get Plugin or Get Source (pauseprotect.sp - 1025 views - 1.5 KB)
    File Type: sp Get Plugin or Get Source (pauseprotect_withchecking.sp - 895 views - 2.1 KB)

    Last edited by Anhil; 02-18-2011 at 07:26.
    Anhil is offline
    Maxtasy
    Member
    Join Date: Oct 2010
    Old 02-12-2011 , 22:37   Re: [HL2DM] Pause protect
    Reply With Quote #2

    i tried this plugin today on my server. i paused it and left. after 5min the map still didnt change. does it maybe think SourceTV is a player?
    Maxtasy is offline
    Anhil
    Member
    Join Date: Jan 2011
    Old 02-13-2011 , 07:43   Re: [HL2DM] Pause protect
    Reply With Quote #3

    Quote:
    Originally Posted by Maxtasy View Post
    does it maybe think SourceTV is a player?
    No, it checks with IsFakeClient(). I tried it on my own server, it worked. Which version did you test, btw?
    Anhil is offline
    Maxtasy
    Member
    Join Date: Oct 2010
    Old 02-13-2011 , 19:27   Re: [HL2DM] Pause protect
    Reply With Quote #4

    i tried it with both versions.
    Maxtasy is offline
    Anhil
    Member
    Join Date: Jan 2011
    Old 02-14-2011 , 07:13   Re: [HL2DM] Pause protect
    Reply With Quote #5

    Try attached plugin, it will add "sm_gametime" command. What you have to do:
    1) sm_gametime
    2) sm_gametime (it should be different)
    3) pause
    4) sm_gametime
    5) sm_gametime (it should be same)
    6) Post here what it reports to you.
    Attached Files
    File Type: sp Get Plugin or Get Source (pauseprotect_testing.sp - 780 views - 478 Bytes)
    Anhil is offline
    Maxtasy
    Member
    Join Date: Oct 2010
    Old 02-14-2011 , 12:28   Re: [HL2DM] Pause protect
    Reply With Quote #6

    Code:
    ] rcon sm_gametime
    [SM] GetGameTime(): 1108250460
    ] rcon sm_gametime
    [SM] GetGameTime(): 1110385623
    ] pause
    pwn*| Maxtasy paused the game
    ] rcon sm_gametime
    [SM] GetGameTime(): 1117722378
    ] rcon sm_gametime
    [SM] GetGameTime(): 1117722378
    Maxtasy is offline
    Anhil
    Member
    Join Date: Jan 2011
    Old 02-14-2011 , 13:12   Re: [HL2DM] Pause protect
    Reply With Quote #7

    It's very strange, could you try attached to this post versions, please? They will report about all actions to server console. (PlayerCount, IsFakeClient(), GameTime, Client connected/disconnected, plugin loaded, sv_pausable cvar changed)
    Attached Files
    File Type: sp Get Plugin or Get Source (pauseprotect_debug.sp - 815 views - 2.1 KB)
    File Type: sp Get Plugin or Get Source (pauseprotect_withchecking_debug.sp - 661 views - 3.1 KB)

    Last edited by Anhil; 02-14-2011 at 14:12.
    Anhil is offline
    Maxtasy
    Member
    Join Date: Oct 2010
    Old 02-15-2011 , 03:08   Re: [HL2DM] Pause protect
    Reply With Quote #8

    i connected to the server, changed sv_pausable to 1, then paused the game and left the server. after over 1 minute the server didnt change the map, so i did manually with hlsw.

    Code:
    L 02/15/2011 - 09:00:33: "pwn*| Maxtasy<7><STEAM_0:0:00000000><>" connected, address "XX.XX.XX.XX:XXXXX"
    L 02/15/2011 - 09:00:33: "pwn*| Maxtasy<7><STEAM_0:0:00000000><>" STEAM USERID validated
    L 02/15/2011 - 09:00:41: "pwn*| Maxtasy" cl_cmdrate = "100"
    L 02/15/2011 - 09:00:41: "pwn*| Maxtasy<7><STEAM_0:0:00000000><>" entered the game
    L 02/15/2011 - 09:01:11: server_cvar: "sv_pausable" "1"
    L 02/15/2011 - 09:01:11: rcon from "XX.XX.XX.XX:XXXXX": command "sv_pausable 1"
    L 02/15/2011 - 09:01:27: "pwn*| Maxtasy<7><STEAM_0:0:00000000><Unassigned>" disconnected (reason "Disconnect by user.")
    L 02/15/2011 - 09:02:49: rcon from "XX.XX.XX.XX:XXXXX": command "changelevel dm_ethic"
    L 02/15/2011 - 09:02:49: [META] Loaded 0 plugins (1 already loaded)
    L 02/15/2011 - 09:02:49: [META] Loaded 0 plugins (1 already loaded)
    L 02/15/2011 - 09:02:49: Log file closed
    Maxtasy is offline
    Anhil
    Member
    Join Date: Jan 2011
    Old 02-15-2011 , 07:54   Re: [HL2DM] Pause protect
    Reply With Quote #9

    Do you have direct access to server console? Because debug version uses PrintToServer(), I'm not sure, if it will be added to log files or not. But if you don't, try attached version, it also has LogToGame().

    Also one note: if your server doesn't have "sm_nextmap", it will change to same map.

    Code:
    L 02/15/2011 - 15:52:11: [PauseProtect-debug] Plugin loaded, PlayerCount = 0
    L 02/15/2011 - 15:52:21: [META] Loaded 0 plugins (1 already loaded)
    Attached Files
    File Type: sp Get Plugin or Get Source (pauseprotect_debug_logs.sp - 824 views - 2.9 KB)
    File Type: sp Get Plugin or Get Source (pauseprotect_withchecking_debug_logs.sp - 802 views - 4.1 KB)

    Last edited by Anhil; 02-15-2011 at 07:57.
    Anhil is offline
    Anhil
    Member
    Join Date: Jan 2011
    Old 02-18-2011 , 07:26   Re: [HL2DM] Pause protect
    Reply With Quote #10

    Updated, see changelog.
    Anhil 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 16:21.


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