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

Best way to block vehicle kills


Post New Thread Reply   
 
Thread Tools Display Modes
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 08-05-2014 , 17:10   Re: Best way to block vehicle kills
Reply With Quote #11

Kills him when it crushes him into a wall or drives over him?
klippy is offline
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 08-05-2014 , 17:20   Re: Best way to block vehicle kills
Reply With Quote #12

Both.
__________________
Flick3rR is offline
Send a message via Skype™ to Flick3rR
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 08-05-2014 , 18:04   Re: Best way to block vehicle kills
Reply With Quote #13

Try blocking Ham_TakeDamage(CBasePlayer::TakeDamage) when the attacker is of a class "func_vehicle". And I think that you can't block crushing, because it's the way engine threats crushing(killing the player), but I may be wrong.
klippy is offline
OnePL
BANNED
Join Date: May 2012
Location: GB
Old 08-06-2014 , 08:48   Re: Best way to block vehicle kills
Reply With Quote #14

PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>

public plugin_init() {
    
register_plugin("Block Vehicle Damage""1.0""OnePL");

    
RegisterHam(Ham_TakeDamage"player""TakeDamageVehicle");
}

public 
TakeDamageVehicle(ident) {
    static 
name[32]; pev(ent1name31);
    if(
equal(name"func_vehicle")) {
        
SetHamParamFloat(40.0);
        return 
2;
    }
    return 
1;

OnePL is offline
Send a message via ICQ to OnePL Send a message via AIM to OnePL Send a message via Yahoo to OnePL Send a message via Skype™ to OnePL
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 16:57.


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