AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Adding person to assist list, without making damage. (https://forums.alliedmods.net/showthread.php?t=306144)

iGANGNAM 03-18-2018 05:35

Adding person to assist list, without making damage.
 
Hello. How to add person to killing assist list, even he is not making damage at this moment. Let's say I have smoker zombie class and I want person to have assist because he dragged that person. Game CS:GO

Neuro Toxin 03-18-2018 06:44

Re: Adding person to assist list, without making damage.
 
Hook death event and update params?

cravenge 03-18-2018 08:22

Re: Adding person to assist list, without making damage.
 
Pre hook "player_hurt" event and trick the game, maybe?

eyal282 03-18-2018 08:57

Re: Adding person to assist list, without making damage.
 
When a smoker begins to drag, this code?

Code:

new inflictor = GetPlayerWeaponSlot(Smoker, 3); // You need to replace 3 with the knife slot, no clue which slot is the knife so you gotta try all 5 slots until you locate it.

if(inflictor != -1)
{
        new Health = GetEntProp(DragVictim, Prop_Send, "m_iHealth");
        SetEntityHealth(DragVictim, Health + 1);
        SDKHooks_TakeDamage(DragVictim, inflictor, Smoker, 1.0);
}

Didn't even try to compile so tell me if everything works, you need to include sdkhooks.


All times are GMT -4. The time now is 21:55.

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