Raised This Month: $214 Target: $400
 53% 

[L4D & L4D2] Vote Poll Fix


Post New Thread Reply   
 
Thread Tools Display Modes
Author
disawar1
AlliedModders Donor
Join Date: Aug 2011
Location: Russian
Plugin ID:
3705
Plugin Version:
1.2
Plugin Category:
General Purpose
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    242 
    Plugin Description:
    Changes number of players eligible to vote
    Old 06-21-2013 , 13:36   [L4D & L4D2] Vote Poll Fix
    Reply With Quote #1

    About:

    - As we can see there 5 voting polls insted of 4, it's because of SPECTATORS! And nobody likes it. So plugin changes number of players eligible to vote, basically it removes these spectators polls. Enjoy!


    Credits:
    • Scratchy [Laika] - For help testing.

    Features:
    • Supports both left 4 dead games.
    • Can be used in all gamemodes.
    • No affect on the game voting.
    • Compatible with votemanager and other plugins with same function.
    • Simple and optimized.
    • Yep, it sounds as advertising slogan, but its not

    Cvars/Commands:

    - No.


    Changelog:

    v 1.2 (23 August 2013)
    - Nothing major! Just make plugin compatible with the future SM versions. (eric0279 report)

    v 1.1 (22 June 2013) ~116 views
    - Supports all issues that can be voted on.

    v 1.0 (21 June 2013) ~8 views
    - Release.
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d_votepoll_fix.sp - 1495 views - 3.5 KB)
    __________________

    Last edited by disawar1; 08-15-2018 at 21:30. Reason: remove missing images
    disawar1 is offline
    TrueSurvivor
    Member
    Join Date: Jun 2010
    Old 07-17-2013 , 06:31   Re: [L4D & L4D2] Vote Poll Fix
    Reply With Quote #2

    Awesome, I never stopped to fix this even though it was quite annoying every time it happened.
    Good work, runs smoothly.
    TrueSurvivor is offline
    eric0279
    AlliedModders Donor
    Join Date: May 2007
    Old 08-22-2013 , 10:51   Re: [L4D & L4D2] Vote Poll Fix
    Reply With Quote #3

    Hello,

    just 1 warning :
    Quote:
    //// l4d_votepoll_fix.sp
    // D:\Documents\Downloads\sourcemod-1.6.0-hg4028-linux\addons\sourcemod\scriptin
    g\pwg\l4d_votepoll_fix.sp(32) : warning 234: symbol "GuessSDKVersion" is marked
    as deprecated: See GetEngineVersion()
    //
    // Header size: 2720 bytes
    // Code size: 4032 bytes
    // Data size: 1544 bytes
    // Stack/heap size: 16384 bytes; Total requirements: 24680 bytes
    //
    // 1 Warning.
    //
    // Compilation Time: 0,22 sec
    Nice plugin !
    eric0279 is offline
    Electr000999
    Senior Member
    Join Date: Aug 2011
    Location: Russia, Perm
    Old 08-22-2013 , 11:31   Re: [L4D & L4D2] Vote Poll Fix
    Reply With Quote #4

    disawar1, eric0279 replace in source

    Code:
    GuessSDKVersion() == SOURCE_SDK_LEFT4DEAD
    TO

    Code:
    GetEngineVersion() == Engine_Left4Dead
    Fixed variant here:
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d_votepoll_fix.sp - 909 views - 3.4 KB)

    Last edited by Electr000999; 08-22-2013 at 11:34.
    Electr000999 is offline
    Send a message via Skype™ to Electr000999
    eric0279
    AlliedModders Donor
    Join Date: May 2007
    Old 08-22-2013 , 11:42   Re: [L4D & L4D2] Vote Poll Fix
    Reply With Quote #5

    Thanks Electr000999.

    For l4d2 :
    PHP Code:
    GetEngineVersion() == Engine_Left4Dead2 
    ?
    eric0279 is offline
    Electr000999
    Senior Member
    Join Date: Aug 2011
    Location: Russia, Perm
    Old 08-22-2013 , 11:53   Re: [L4D & L4D2] Vote Poll Fix
    Reply With Quote #6

    eric0279 yes, you can see enum codes here

    Code:
    enum EngineVersion
    {
    	Engine_Unknown,				/**< Could not determine the engine version */
    	Engine_Original,				/**< Original Source Engine (used by The Ship) */
    	Engine_SourceSDK2006,		/**< Episode 1 Source Engine (second major SDK) */
    	Engine_SourceSDK2007,		/**< Orange Box Source Engine (third major SDK) */
    	Engine_Left4Dead,			/**< Left 4 Dead */
    	Engine_DarkMessiah,			/**< Dark Messiah Multiplayer (based on original engine) */
    	Engine_Left4Dead2 = 7,		/**< Left 4 Dead 2 */
    	Engine_AlienSwarm,			/**< Alien Swarm (and Alien Swarm SDK) */
    	Engine_BloodyGoodTime,		/**< Bloody Good Time */
    	Engine_EYE,					/**< E.Y.E Divine Cybermancy */
    	Engine_Portal2,				/**< Portal 2 */
    	Engine_CSGO,				/**< Counter-Strike: Global Offensive */
    	Engine_CSS,					/**< Counter-Strike: Source */
    	Engine_DOTA,				/**< Dota 2 */
    	Engine_HL2DM,				/**< Half-Life 2 Deathmatch */
    	Engine_DODS,				/**< Day of Defeat: Source */
    	Engine_TF2,					/**< Team Fortress 2 */
    	Engine_NuclearDawn			/**< Nuclear Dawn */
    };

    Last edited by Electr000999; 08-22-2013 at 11:54.
    Electr000999 is offline
    Send a message via Skype™ to Electr000999
    eric0279
    AlliedModders Donor
    Join Date: May 2007
    Old 08-22-2013 , 12:24   Re: [L4D & L4D2] Vote Poll Fix
    Reply With Quote #7

    Thanks!
    eric0279 is offline
    disawar1
    AlliedModders Donor
    Join Date: Aug 2011
    Location: Russian
    Old 08-22-2013 , 14:26   Re: [L4D & L4D2] Vote Poll Fix
    Reply With Quote #8

    uhm..I am writing plugins on stable SM branch, but if you use 1.6...Ok I make it compatible with experimental SM too.
    __________________
    disawar1 is offline
    eric0279
    AlliedModders Donor
    Join Date: May 2007
    Old 08-22-2013 , 22:14   Re: [L4D & L4D2] Vote Poll Fix
    Reply With Quote #9

    Quote:
    Originally Posted by disawar1 View Post
    uhm..I am writing plugins on stable SM branch, but if you use 1.6...Ok I make it compatible with experimental SM too.

    Yes i use 1.6.0 :$
    eric0279 is offline
    Powerlord
    AlliedModders Donor
    Join Date: Jun 2008
    Location: Seduce Me!
    Old 08-23-2013 , 11:57   Re: [L4D & L4D2] Vote Poll Fix
    Reply With Quote #10

    Quote:
    Originally Posted by disawar1 View Post
    uhm..I am writing plugins on stable SM branch, but if you use 1.6...Ok I make it compatible with experimental SM too.
    Newer 1.5 versions also use this.

    Incidentally, I wrote a stock to deal with this, but it only converts from GuessSDKVersion values to GetEngineVersion ones... meaning it requires a newer 1.5 or 1.6 compiler to use.
    __________________
    Not currently working on SourceMod plugin development.

    Last edited by Powerlord; 08-23-2013 at 11:58.
    Powerlord 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 04:40.


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