AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Wall rechargers, driving vehicle (https://forums.alliedmods.net/showthread.php?t=210897)

Backstabnoob 03-15-2013 19:08

Wall rechargers, driving vehicle
 
I've got two questions:

1) Wall rechargers. These Half-Life health/armor wall rechargers. How do you hook them? I need to know who's using one and how many health/armor did they get by using it.

2) If a player's currently driving a vehicle. I know about hooking Ham_Use, but I need to detect when someone's got killed while driving a vehicle.


Edit for #1: Using Ham_TakeHealth seems to work, although how do I know if a user's using the charger at some time? Is there a Ham hook that get's called when the healing is done or something? Also, what about armor?

Thanks in advance.

tonykaram1993 03-20-2013 17:42

Re: Wall rechargers, driving vehicle
 
1) Those are for the health healers and armor ones.
PHP Code:

RegisterHamHam_Use,                         "func_healthcharger",     "Ham_Use_Recharger_Pre",                    false );
RegisterHamHam_Use,                         "func_recharge",         "Ham_Use_Recharger_Pre",                     false ); 

2) About this, I think maybe looking at the Vehicle Real Killer plugin will give you an idea.


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

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