Raised This Month: $ Target: $400
 0% 

falldamage


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 01-08-2016 , 09:55   Re: falldamage
Reply With Quote #6

I guess he wants a player to just spawn again instead of dying. I've seen that on a surf speed-run server before.

This should do it.
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>

#pragma semicolon true


public plugin_init() {
    
register_plugin("Plugin""v1.0.0""Author");
    
    
RegisterHam(Ham_TakeDamage"player""Player_TakeDamage"false);
}


public 
Player_TakeDamage(thisiInflictoriAttackerFloatfDamagebitsDamageType) {
    if(!
is_user_connected(this)) { // Sanity check
        
return HAM_IGNORED;
    }
    
    if(
bitsDamageType DMG_FALL && fDamage >= pev(thispev_health)) {
        
ExecuteHamB(Ham_CS_RoundRespawnthis);
        return 
HAM_SUPERCEDE;
    }
    
    return 
HAM_IGNORED;

klippy is offline
 



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 09:32.


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