This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

[l4d2] infinite shove and shove enabled on charger!


Post New Thread Reply   
 
Thread Tools Display Modes
Author
eyal282
Veteran Member
Join Date: Aug 2011
Plugin ID:
8668
Plugin Version:
Plugin Category:
All
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Unapprover:
    Reason for Unapproving:
    Only changes game cvars.
    Old 03-21-2024 , 15:26   Re: [l4d2] infinite shove and shove enabled on charger!
    Reply With Quote #1

    Quote:
    Originally Posted by Pizza baiana View Post
    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");
    }
    __________________
    I am available to make plugins for pay.

    Discord: Eyal282#1334

    Last edited by eyal282; 03-21-2024 at 15:30.
    eyal282 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 15:03.


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