Quote:
Originally Posted by Pizza baiana
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