AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=109)
-   -   [l4d2] infinite shove and shove enabled on charger! (https://forums.alliedmods.net/showthread.php?t=346852)

Pizza baiana 03-21-2024 10:46

[l4d2] infinite shove and shove enabled on charger!
 
3 Attachment(s)
a plugin with a simple construction that I made a while ago but I don't remember why I didn't put it here. I only remembered this plugin when I saw someone in a topic asking about the plugins of a server like infinite shove...so I decided to put it here because it's probably what someone is looking for.

there are 2 versions of this plugin:

SHOVE_INFINITE_AND_CHARGER_SHOVE: allows you to perform infinite shove and apply shove to the charger.

SHOVE_INFINITE_AND_NO_CHARGER_SHOVE: only applies the infinite shove and does not apply the shove on the charger.

Pizza baiana 03-21-2024 10:48

Re: [l4d2] infinite shove and shove enabled on charger!
 
i hope the plugin masters don't bother with the code for this plugin XXXXDDDDDD

eyal282 03-21-2024 15:26

Re: [l4d2] infinite shove and shove enabled on charger!
 
Quote:

Originally Posted by Pizza baiana (Post 2819856)
i hope the plugin masters don't bother with the code for this plugin XXXXDDDDDD

I see you're able to program basic things. Ask Chat GPT or Bing AI to add cvars to enable and disable the plugin and check for bugs.

Edit: this code of Bing AI should work after giving a quick look

Code:

#include <sourcemod>
#include <sdktools>

public Plugin myinfo =
{
        name = "Quick Revive",
        author = "WhatsAnName",
        description = "quickly revive teamates",
        version = "1.0",
        url = "https://forums.alliedmods.net/showthread.php?p=2596793#post2596793"
};

// Define ConVars
ConVar g_cvarChargerShove;
ConVar g_cvarInfiniteShove;

public void OnPluginStart()
{
        // Create ConVars
        g_cvarChargerShove = CreateConVar("charger_shove", "1", "Enable or disable charger shove");
        g_cvarInfiniteShove = CreateConVar("infinite_shove", "1", "Enable or disable infinite shove");

        // Hook ConVar changes
        HookConVarChange(g_cvarChargerShove, vCvarChanges);
        HookConVarChange(g_cvarInfiniteShove, vCvarChanges);

        AutoExecConfig(true, "Quick Revive");
}

public void OnConfigsExecuted()
{
        iChangeCvars();
}

public void vCvarChanges(Handle convar, const char[] oldValue, const char[] newValue)
{
        iChangeCvars();
}

int iChangeCvars()
{
        // Use ConVar values in your function
        SetConVarString(FindConVar("z_gun_swing_vs_cooldown"), GetConVarBool(g_cvarInfiniteShove) ? "0" : "1");
        SetConVarString(FindConVar("z_charger_allow_shove"), GetConVarBool(g_cvarChargerShove) ? "1" : "0");
}


Silvers 03-21-2024 19:02

Re: [l4d2] infinite shove and shove enabled on charger!
 
These are just cvar changes anyone can do in the config. Low quality plugin. Sorry, unapproved.

Quote:

Originally Posted by eyal282 (Post 2819865)
add cvars to enable and disable the plugin and check for bugs.

You can do this with a map config plugin. The original plugin is only changing game cvars, no need for extra enable/disable plugin.


All times are GMT -4. The time now is 01:38.

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