[CS:GO] trying to give health per kill
I was searching the web for a base to write my plugin on and I found this piece of code:
Code:
public Action OnPlayerDeath(Handle event, char[] name, bool dontBroadcast) Code:
public Action OnPlayerDeath(Handle event, char[] name, bool dontBroadcast) Basically, this is the scheme: - When someone is killed, the attacker gets +10 HP; - The max health should be 150; Can anyone explain what am I doing wrong? |
Re: [CS:GO] trying to give heath per kill
i think this can help you: https://forums.alliedmods.net/showpo...16&postcount=7
|
Re: [CS:GO] trying to give heath per kill
Quote:
Now I can detect when the victim dies, but instead of giving +10HP it is giving +30, +40... Code:
public OnClientPutInServer(client) Code:
Health: 100 |
Re: [CS:GO] trying to give heath per kill
Quote:
Where do you see +30 +40? |
Re: [CS:GO] trying to give heath per kill
Quote:
When I was testing the code, I killed one single enemy but instead of getting +10HP it looks like it was regenerating. That console output was for killing one enemy only. |
Re: [CS:GO] trying to give heath per kill
Maybe change
PHP Code:
PHP Code:
|
Re: [CS:GO] trying to give heath per kill
Quote:
Can you explain or link to anything that explains the difference of behavior of the HookEvent() in the OnPluginStart vs. OnClientPutInServer? |
Re: [CS:GO] trying to give heath per kill
Quote:
|
Re: [CS:GO] trying to give heath per kill
Quote:
|
All times are GMT -4. The time now is 11:23. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.