Raised This Month: $ Target: $400
 0% 

Ham_takedamage and global var


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
EpicMonkey
buttmonkey
Join Date: Feb 2012
Old 06-10-2012 , 16:11   Ham_takedamage and global var
Reply With Quote #1

So ... Here's what am trying to do :

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

#define PLUGIN "Test"
#define VERSION "1.0"
#define AUTHOR "Epic"

new TestPlayer;

public 
plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
RegisterHam(Ham_TakeDamage"player""Fw_TakeDamage")
    
    
register_clcmd("say /test""Test")
}

public 
Test(id)
{
    
TestPlayer id
}

public 
Fw_TakeDamage(victiminflictorattackerFloat:damagedamagetype)
{
    if(
attacker == TestPlayer)
    {
        
client_print(0print_chat"Attacker is a test player")
    }
    else if(
attacker != TestPlayer)
    {
        
client_print(0print_chat"Attacker is not test player")
    }

here's the problem , when i attack a player , it doesnt print a message , but when another play attack me , it shows that Attacker is not a test player.

Any help would be appreciated , even a hint would be appreciated ...

Last edited by EpicMonkey; 06-10-2012 at 16:16.
EpicMonkey is offline
 


Thread Tools
Display Modes

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 06:17.


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