AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   [L4D] Unlimited Use Medkit/Pill (https://forums.alliedmods.net/showthread.php?t=104382)

simonseang 09-22-2009 16:08

[L4D] Unlimited Use Medkit/Pill
 
It is possible to make a plugin that allow player to use unlimited medkit or pill without cheat turn on?
I try to set "sm_cvar ammo_firstaid_max -2" but it did not work.

LTR.2 09-22-2009 17:50

Re: [L4D] Unlimited Use Medkit/Pill
 
why would you do that?

simonseang 09-23-2009 00:43

Re: [L4D] Unlimited Use Medkit/Pill
 
survivor_max_incapacitated _count 0
first_aid_heal_percent 0.2
rescue_min_dead_time 99999

i plan to use this setting on my coop dedicate server with Smoker Cloud Damage and Boomer Splash Damage plugins to do serious damage to survivor.
Because u can die instant,no closet rescue and the medkit heal only 20% so it be fair if the survivor to have infinite medkit use.
anyone know to how to make the plugin?

olj 09-23-2009 03:41

Re: [L4D] Unlimited Use Medkit/Pill
 
I suppose to regive medkits after usage.

olj 09-23-2009 04:05

Re: [L4D] Unlimited Use Medkit/Pill
 
1 Attachment(s)
Here you go. UNTESTED - but should work :), will just give another med after healing.

simonseang 09-23-2009 06:46

Re: [L4D] Unlimited Use Medkit/Pill
 
Thanks! The plugin work Perfect !!:wink:

λlsnana(H λ l f l i f e) 06-29-2010 13:26

Re: [L4D] Unlimited Use Medkit/Pill
 
Quote:

Originally Posted by olj (Post 941254)
Here you go. UNTESTED - but should work :), will just give another med after healing.

Well Is there any? cvars to disable it?

dirka_dirka 06-29-2010 17:56

Re: [L4D] Unlimited Use Medkit/Pill
 
sm plugins unload infmedkit.smx
theres yer cvar

canadianjeff 10-07-2021 22:05

Re: [L4D] Unlimited Use Medkit/Pill
 
Code:

#define PLUGIN_VERSION "0.1"
#include <sourcemod>
#include <sdktools>
#pragma semicolon 1

//#define CVAR_FLAGS FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_NOTIFY

public Plugin:myinfo =

{
        name = "Infinite Adren Shots",
        author = "Olj",
        description = "Infinite Shots",
        version = PLUGIN_VERSION,
        url = "http://www.sourcemod.net/"
}

public OnPluginStart()
{
        HookEvent("heal_success", HealEvent);
        HookEvent("adrenaline_used", AdrenalineUsed_Event);
        CreateConVar("l4d_infmed_version", PLUGIN_VERSION, "Version of Infinite adren shots", FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY|FCVAR_DONTRECORD);
}


//Code for Medpacks
public HealEvent(Handle:event, const String:name[], bool:dontBroadcast)
{
new Healer = GetClientOfUserId(GetEventInt(event, "userid"));
CreateTimer(0.1, RegivingMeds, any:Healer);
}

public Action:RegivingMeds(Handle:timer, any:Healer)
{
ExecuteCommand(Healer, "give", "first_aid_kit");
}

//Code for Adrenaline Shots
public AdrenalineUsed_Event(Handle:event, const String:name[], bool:dontBroadcast)
{
new AdrenShot = GetClientOfUserId(GetEventInt(event, "userid"));
CreateTimer(0.1, RegivingShots, any:AdrenShot);
}

public Action:RegivingShots(Handle:timer, any:AdrenShot)
{
ExecuteCommand(AdrenShot, "give", "adrenaline");
}



ExecuteCommand(Client, String:strCommand[], String:strParam1[])
{
    if (Client==0) return;
    new Flags = GetCommandFlags(strCommand);
    SetCommandFlags(strCommand, Flags & ~FCVAR_CHEAT);
    FakeClientCommand(Client, "%s %s", strCommand, strParam1);
    CreateTimer(0.1, RevertingFlags, any:Flags);
}

public Action:RevertingFlags(Handle:timer, any:Flags)
{
SetCommandFlags("give", Flags);
}

code for Adren Shots As Well


All times are GMT -4. The time now is 11:29.

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