Raised This Month: $ Target: $400
 0% 

Ham_TakeDamage


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
z-@T
New Member
Join Date: May 2010
Old 05-13-2010 , 16:58   Ham_TakeDamage
Reply With Quote #1

Ok, here's the problem:
I have this code:

PHP Code:
public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR);
    
RegisterHam(Ham_TakeDamage"player""eventTakeDamage");
    
RegisterHam(Ham_Spawn"player""eventSpawn");
}

public 
eventSpawn(id)
{
    
dmgPlayer 0;
    return 
PLUGIN_CONTINUE;
}

public 
eventTakeDamage(idweaponattackerFloat:damagedamagebits)
{
    
dmgPlayer += damage;
    
get_user_name(idVictimName29);
    if(
attacker != && attacker != id)
    {
        
client_print(attackerprint_chat"You have done %i damage to %s!"dmgPlayerVictimName);
    }
    return 
PLUGIN_HANDLED;

And now the problem is that eventTakeDamage function prints me "You have done 1026698563 damage to r0cc0".

I'm sure you noticed that it's quite impossible for me to have made r0cc0 that much damage, but that is what the message returned.

I have other mistakes with the code too, but nothing I can't handle so this is the main problem.

Hope you help.
z-@T 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 03:44.


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