Raised This Month: $32 Target: $400
 8% 

[L4D] Unlimited Use Medkit/Pill


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
simonseang
Junior Member
Join Date: Jul 2009
Old 09-22-2009 , 16:08   [L4D] Unlimited Use Medkit/Pill
Reply With Quote #1

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.
simonseang is offline
LTR.2
Veteran Member
Join Date: Aug 2009
Old 09-22-2009 , 17:50   Re: [L4D] Unlimited Use Medkit/Pill
Reply With Quote #2

why would you do that?
LTR.2 is offline
simonseang
Junior Member
Join Date: Jul 2009
Old 09-23-2009 , 00:43   Re: [L4D] Unlimited Use Medkit/Pill
Reply With Quote #3

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?

Last edited by simonseang; 09-23-2009 at 00:49.
simonseang is offline
olj
Veteran Member
Join Date: Jun 2009
Old 09-23-2009 , 03:41   Re: [L4D] Unlimited Use Medkit/Pill
Reply With Quote #4

I suppose to regive medkits after usage.
__________________
olj is offline
olj
Veteran Member
Join Date: Jun 2009
Old 09-23-2009 , 04:05   Re: [L4D] Unlimited Use Medkit/Pill
Reply With Quote #5

Here you go. UNTESTED - but should work , will just give another med after healing.
Attached Files
File Type: sp Get Plugin or Get Source (InfMedkit.sp - 681 views - 1.3 KB)
__________________
olj is offline
simonseang
Junior Member
Join Date: Jul 2009
Old 09-23-2009 , 06:46   Re: [L4D] Unlimited Use Medkit/Pill
Reply With Quote #6

Thanks! The plugin work Perfect !!
simonseang is offline
λlsnana(H λ l f l i f e)
Member
Join Date: Jun 2010
Old 06-29-2010 , 13:26   Re: [L4D] Unlimited Use Medkit/Pill
Reply With Quote #7

Quote:
Originally Posted by olj View Post
Here you go. UNTESTED - but should work , will just give another med after healing.
Well Is there any? cvars to disable it?
λlsnana(H λ l f l i f e) is offline
Send a message via MSN to λlsnana(H λ l f l i f e)
dirka_dirka
Veteran Member
Join Date: Nov 2009
Old 06-29-2010 , 17:56   Re: [L4D] Unlimited Use Medkit/Pill
Reply With Quote #8

sm plugins unload infmedkit.smx
theres yer cvar
dirka_dirka is offline
canadianjeff
BANNED
Join Date: Sep 2016
Old 10-07-2021 , 22:05   Re: [L4D] Unlimited Use Medkit/Pill
Reply With Quote #9

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

Last edited by canadianjeff; 10-07-2021 at 22:25.
canadianjeff is offline
Reply


Thread Tools
Display Modes

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 10:58.


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