Raised This Month: $ Target: $400
 0% 

Player Out Of Range


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 06-01-2007 , 08:18   Re: Player Out Of Range
Reply With Quote #3

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>

new g_max_players

public plugin_init() {
    
register_plugin("Syphon Health""1.0""Jengerer")
    
register_event("Damage""SyphonHealth""b""2!0")
    
g_max_players get_maxplayers()
}

public 
SyphonHealth(Victim) {
    if( 
Victim || Victim g_max_players)  //check if Victim is a valid player id
        
return PLUGIN_CONTINUE

    
new Attacker get_user_attacker(Victim)
    if( 
Attacker || Attacker g_max_players//check if Attacker is a valid player id
        
return PLUGIN_CONTINUE

    
new Health get_user_health(Attacker)
    new 
Damage read_data(2)

    if (
Attacker) {
        
set_user_health(Attacker, (Health+Damage));
        
set_hudmessage(20000, -1.00.5520.14.00.020.027);
        
show_hudmessage(Attacker,"%i+ (%i)"DamageHealth+Damage);
    }
    return 
PLUGIN_CONTINUE

__________________
Impossible is Nothing
Sylwester 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 10:41.


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