AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D & L4D2] Vote Poll Fix (https://forums.alliedmods.net/showthread.php?t=218829)

disawar1 06-21-2013 13:36

[L4D & L4D2] Vote Poll Fix
 
1 Attachment(s)
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.

TrueSurvivor 07-17-2013 06:31

Re: [L4D & L4D2] Vote Poll Fix
 
Awesome, I never stopped to fix this even though it was quite annoying every time it happened.
Good work, runs smoothly. :)

eric0279 08-22-2013 10:51

Re: [L4D & L4D2] Vote Poll Fix
 
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 !

Electr000999 08-22-2013 11:31

Re: [L4D & L4D2] Vote Poll Fix
 
1 Attachment(s)
disawar1, eric0279 replace in source

Code:

GuessSDKVersion() == SOURCE_SDK_LEFT4DEAD
TO

Code:

GetEngineVersion() == Engine_Left4Dead
Fixed variant here:

eric0279 08-22-2013 11:42

Re: [L4D & L4D2] Vote Poll Fix
 
Thanks Electr000999.

For l4d2 :
PHP Code:

GetEngineVersion() == Engine_Left4Dead2 

?

Electr000999 08-22-2013 11:53

Re: [L4D & L4D2] Vote Poll Fix
 
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 */
};


eric0279 08-22-2013 12:24

Re: [L4D & L4D2] Vote Poll Fix
 
Thanks!

disawar1 08-22-2013 14:26

Re: [L4D & L4D2] Vote Poll Fix
 
uhm..I am writing plugins on stable SM branch, but if you use 1.6...Ok I make it compatible with experimental SM too.

eric0279 08-22-2013 22:14

Re: [L4D & L4D2] Vote Poll Fix
 
Quote:

Originally Posted by disawar1 (Post 2019550)
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 :$

Powerlord 08-23-2013 11:57

Re: [L4D & L4D2] Vote Poll Fix
 
Quote:

Originally Posted by disawar1 (Post 2019550)
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.


All times are GMT -4. The time now is 15:04.

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