AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   Killing Enemy give you 100 HP (https://forums.alliedmods.net/showthread.php?t=330604)

denyyyo 02-12-2021 01:46

Killing Enemy give you 100 HP
 
Searching for a plugin that give you in deathmatch mode Full hp (100 HP + 100 Kevlar) after killing 1 Enemy.... any1 know a plugin ?

thank you

yuv41 02-12-2021 01:59

Re: Killing Enemy give you 100 HP
 
That would be gay in hvh

FAQU 02-12-2021 02:10

Re: Killing Enemy give you 100 HP
 
There you go
PHP Code:

#include <sourcemod>
#include <sdktools>

#pragma semicolon 1
#pragma newdecls required

public void OnPluginStart()
{
    
HookEvent("player_death"Event_PlayerDeath);
}

public 
void Event_PlayerDeath(Event event, const char[] namebool dontBroadcast)
{
    
int attacker GetClientOfUserId(event.GetInt("attacker"));
    
int victim GetClientOfUserId(event.GetInt("userid"));
    
    
    if (
attacker == victim || attacker == 0)
    {
        return;
    }
    
    if (
IsPlayerAlive(attacker)) // most likely not needed
    
{
        
SetEntityHealth(attacker100);
        
GivePlayerItem(attacker"item_assaultsuit");
    }




All times are GMT -4. The time now is 17:06.

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