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

[L4D/L4D2] MultiTanks - Improved


Post New Thread Reply   
 
Thread Tools Display Modes
Arthedains
Junior Member
Join Date: Nov 2016
Location: Europe
Old 02-26-2018 , 15:32   Re: [L4D/L4D2] MultiTanks - Improved
Reply With Quote #11

Thank you. This plugin is basically essential if one likes to play custom maps on l4d2 and doesn't want to play l4d2 with default tank HP.
Arthedains is offline
GuStAvOS
Member
Join Date: Mar 2018
Old 03-20-2018 , 15:15   Re: [L4D/L4D2] MultiTanks - Improved
Reply With Quote #12

hola...

The tanks appear together in the wagon ... of the sacrifice?

Gracias
GuStAvOS is offline
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 03-21-2018 , 06:18   Re: [L4D/L4D2] MultiTanks - Improved
Reply With Quote #13

Quote:
Originally Posted by GuStAvOS View Post
[...]
Hola! Please set "multitanks_same_spawn_regular" cvar to 1 to make all tanks spawn at the same place.
cravenge is offline
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 03-27-2018 , 02:15   Re: [L4D/L4D2] MultiTanks - Improved
Reply With Quote #14

Just a heads up for the incoming update:
  1. Fix for tanks being passed in competitive game modes such as Versus. More tanks seem to spawn than the value the cvar is set on once this happens.
  2. Fix for 'once human controlled, now an AI' tanks in competitive game modes such as Versus. Their healths were reverted back to being full as if they hadn't taken any damage.

Last edited by cravenge; 03-27-2018 at 02:16.
cravenge is offline
SilentBr
Veteran Member
Join Date: Jan 2009
Old 05-10-2018 , 09:30   Re: [L4D/L4D2] MultiTanks - Improved
Reply With Quote #15

Hello cravenge,

Thank you for releasing this plugin.

One question: Are you considering release a L4D2 version without L4D2 Downtown? I know you check IsFinale, but I don't want to use the extension. I don't mind if it does not check the map, I want all maps double tank. I have a 20VS server.

Thank you in advance.
SilentBr is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 07-08-2018 , 18:56   Re: [L4D/L4D2] MultiTanks - Improved
Reply With Quote #16

Some code optimizations that you could implement or add so you don't have to upload different versions for both games:

PHP Code:
public APLRes AskPluginLoad2(Handle myselfbool latechar[] errorint err_max)
{
    
EngineVersion evEngine GetEngineVersion();
    if (
evEngine != Engine_Left4Dead && evEngine != Engine_Left4Dead2)
    {
        
strcopy(errorerr_max"This plugin only supports Left 4 Dead 1 & 2.");
        return 
APLRes_SilentFailure;
    }
    return 
APLRes_Success;
}

stock bool bIsFinaleMap()
{
    return 
FindEntityByClassname(-1"trigger_finale") != -1;
}

stock bool bIsL4D2Game()
{
    return 
GetEngineVersion() == Engine_Left4Dead2;
}

stock bool bIsInfected(int client)
{
    return 
client && client <= MaxClients && IsClientInGame(client) && GetClientTeam(client) == && IsPlayerAlive(client) && !IsClientInKickQueue(client);
}

stock bool bIsTank(int client)
{
    if (
bIsInfected(client))
    {
        
int iClass GetEntProp(clientProp_Send"m_zombieClass");
        if ((
bIsL4D2Game() && iClass == 8) || (!bIsL4D2Game() && iClass == 5))
        {
            return 
true;
        }
    }
    return 
false;
}

stock bool bIsPlayerBurning(int client)
{
    if (
GetEntPropFloat(clientProp_Send"m_burnPercent") > 0)
    {
        return 
true;
    }
    return 
false;
}

stock bool bIsPlayerFired(int client)
{
    if (
GetEntProp(clientProp_Data"m_fFlags") & FL_ONFIRE)
    {
        return 
true;
    }
    return 
false;

__________________
Psyk0tik is offline
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 07-09-2018 , 01:09   Re: [L4D/L4D2] MultiTanks - Improved
Reply With Quote #17

I'm still sticking to the L4DT2 method... but I can make another one which reads a config file and under that config file is the list of the finale maps that this plugin shouldn't operate to eliminate the process of hardcoding them into the source file.

Quote:
Originally Posted by Crasher_3637 View Post
[...]
Almost all of these checks are already in the update.

Last edited by cravenge; 07-09-2018 at 01:12.
cravenge is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 07-09-2018 , 01:32   Re: [L4D/L4D2] MultiTanks - Improved
Reply With Quote #18

I know, that's why I said "optimizations." Currently, the plugins get the game folder name for checking what game it is. It would be better to cover loose ends (such as someone renaming the game folder for whatever reason) by just checking the engine version of the game. And in your IsPlayerBurning check, you're using GetEntDataFloat, but GetEntPropFloat is safer and more robust, which is what I showed above. I also included another way to check for someone that's on fire.

As for the config file idea, perhaps you could use ReadMapList() to help you generate all the map names of all the campaigns you currently have to save some time? And if you want users to decide what maps to disable the plugin in, you could just comment all the lines out when the config is generated, and then players can just uncomment the lines when they want to disable the map, assuming the config file will be a list of disabled maps, not enabled ones. If you need an example, you can look at the code I use in Anti-Speedrunner System and Super Tanks++ to get all installed map names (even the ones in .vpk files).
__________________
Psyk0tik is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 07-27-2018 , 10:14   Re: [L4D/L4D2] MultiTanks - Improved
Reply With Quote #19

When I used my local compiler and the online compiler, I got some errors/warnings about undefined/unused symbols in both L4D1 versions and in one of the L4D2 versions. Here are the fixed ones; they compile just fine.
Attached Files
File Type: sp Get Plugin or Get Source (multitanks_a-l4d.sp - 795 views - 22.9 KB)
File Type: sp Get Plugin or Get Source (multitanks_a-l4d2.sp - 403 views - 22.4 KB)
File Type: smx multitanks_a-l4d2.smx (13.6 KB, 395 views)
File Type: sp Get Plugin or Get Source (multitanks_b-l4d.sp - 725 views - 22.3 KB)
File Type: sp Get Plugin or Get Source (multitanks_b-l4d2.sp - 348 views - 21.7 KB)
File Type: smx multitanks_b-l4d2.smx (13.4 KB, 335 views)
__________________
Psyk0tik is offline
Newbie_Sexy
Member
Join Date: Aug 2016
Location: Vietnam
Old 01-25-2019 , 11:52   Re: [L4D/L4D2] MultiTanks - Improved
Reply With Quote #20

Why the description you said that the version is 2.4 and a huge of cvar but the thing i downloaded from the main post just version 1.4 and only have cvars: "multitanks_health/count_survival/scavenge"? I can't understand @_@
__________________
I am a noob so... hope you guys will help me up
P/s .-. : My English is bad, i am good at Vietnamese

Last edited by Newbie_Sexy; 01-25-2019 at 11:52.
Newbie_Sexy 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:26.


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