Raised This Month: $ Target: $400
 0% 

What is problem?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
SonicSonedit
Veteran Member
Join Date: Nov 2008
Location: Silent Hill
Old 05-06-2011 , 12:28   Re: What is problem?
Reply With Quote #2

1) Use ham to hook damage:
PHP Code:
RegisterHam(Ham_TakeDamage"player",  "ham_TakeDamage"
2) Check if user is valid:
PHP Code:
public ham_TakeDamage(victiminflictorattackerFloat:damagedamage_type)
{
    static 
Float:armor
        
    
if (!is_user_connected(attacker)||victim<1||victim>g_maxplayers||attacker<1||attacker>g_maxplayers||victim==attacker)
        return 
HAM_IGNORED

    client_print
(attackerprint_chat"You hit player %d !"victim)
    
client_print(victimprint_chat"You were hit by player %d !"attacker)

__________________

SonicSonedit 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 04:18.


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