Raised This Month: $51 Target: $400
 12% 

[Forward] OnClientHeal Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
sdz
Senior Member
Join Date: Feb 2012
Old 10-15-2013 , 20:19   [Forward] OnClientHeal Help
Reply With Quote #1

Any suggestions on where I should even attempt to make this? This idea is to check if a client healed, if so then do an action, I've read the entire Wiki Article and still kinda stumped on where I should put it to push when a client heals


tl;dr - Any ideas on how I can check when a client heals
Example:
PHP Code:
public OnClientHeal(Client)
{
     
DoSomething(Client);


Last edited by sdz; 10-15-2013 at 20:25.
sdz is offline
Bimbo1
Senior Member
Join Date: Jan 2010
Location: brazil
Old 10-15-2013 , 22:44   Re: [Forward] OnClientHeal Help
Reply With Quote #2

if heal means having player's life increased, use ongameframe, sdkhooks client think or sendproxy manager extension(this last one might also be able to block the healing) to check if player's health has increased by comparing the value to the last value obtained on the last frame or last think, which you should store in a global array. if the life has been increased, call forward just like that wiki's example.
__________________
sie sind das essen und wir sind die jäger!

Last edited by Bimbo1; 10-15-2013 at 22:45.
Bimbo1 is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 10-15-2013 , 22:51   Re: [Forward] OnClientHeal Help
Reply With Quote #3

What game is it?
Tf2 has some events for this I believe

Player_healed, some healedonhot, healedbymedic...

Else you could run like a 0.1 timer and fire the forward if health changes and they did not die or respawn, just use two arrays for each client.

Or write an extension.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
napalm00
Veteran Member
Join Date: Jun 2011
Location: Italy, sadly
Old 10-16-2013 , 01:07   Re: [Forward] OnClientHeal Help
Reply With Quote #4

Quote:
Originally Posted by friagram View Post
write an extension.
__________________
napalm00 is offline
Reply



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 04:59.


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