Raised This Month: $51 Target: $400
 12% 

Editing Bullet Damage From Amx_Super


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Stressful
Senior Member
Join Date: Feb 2011
Old 06-15-2011 , 22:11   Editing Bullet Damage From Amx_Super
Reply With Quote #1

How do I edit the sma file to , I only want to see my damage done to my enemy . Instead of my damage done and my enemy's damage done .
PHP Code:
public on_damage(id)
{
    if(!
get_pcvar_num(bulletdamage))
        return 
PLUGIN_HANDLED

    
new attacker get_user_attacker(id)
#if defined DAMAGE_RECIEVED

    
if ( is_user_connected(id) && is_user_connected(attacker) )
    {
        new 
damage read_data(2)

        
set_hudmessage(255000.450.5020.14.00.10.1, -1)
        
ShowSyncHudMsg(idg_MsgSync2"-%i^n"damage)

#else
    
if ( is_user_connected(attacker) )
    {
        new 
damage read_data(2)
#endif
        
set_hudmessage(0100200, -1.00.5520.14.00.020.02, -1)
        
ShowSyncHudMsg(attackerg_MsgSync"-%i^n"damage)
    }
    return 
PLUGIN_CONTINUE

__________________
Stressful is offline
DjOptimuS
Senior Member
Join Date: Jan 2009
Old 06-15-2011 , 22:45   Re: Editing Bullet Damage From Amx_Super
Reply With Quote #2

comment #define DAMAGE_RECIEVED

//#define DAMAGE_RECIEVED // Comment out this define to show only damage done, otherwise this will show damage recieved also.

DjOptimuS is offline
Stressful
Senior Member
Join Date: Feb 2011
Old 06-16-2011 , 03:29   Re: Editing Bullet Damage From Amx_Super
Reply With Quote #3

PHP Code:
#if defined DAMAGE_RECIEVED
    
new g_MsgSync2
#endif 
I tried to change but compiles fail , It says that , undefined symbol g_msgSync2
__________________
Stressful is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 06-16-2011 , 07:00   Re: Editing Bullet Damage From Amx_Super
Reply With Quote #4

Show whole code
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
DjOptimuS
Senior Member
Join Date: Jan 2009
Old 06-16-2011 , 07:09   Re: Editing Bullet Damage From Amx_Super
Reply With Quote #5

here
Attached Files
File Type: sma Get Plugin or Get Source (amx_super_proper.sma - 481 views - 167.1 KB)
DjOptimuS is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 06-16-2011 , 09:18   Re: Editing Bullet Damage From Amx_Super
Reply With Quote #6

compiles fine for me
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
Stressful
Senior Member
Join Date: Feb 2011
Old 06-16-2011 , 09:42   Re: Editing Bullet Damage From Amx_Super
Reply With Quote #7

This is from amx_super .
PHP Code:
#if defined DAMAGE_RECIEVED
    
new g_MsgSync2
#endif    
    
gmsgDamage get_user_msgid("Damage")

    
register_event("Damage""on_damage""b""2!0""3=0""4!0")

    
bulletdamage register_cvar("bullet_damage","1");

public 
on_damage(id)
{
    if(!
get_pcvar_num(bulletdamage))
        return 
PLUGIN_HANDLED

    
new attacker get_user_attacker(id)
#if defined DAMAGE_DONE

    
if ( is_user_connected(id) && is_user_connected(attacker) )
    {
        new 
damage read_data(2)

        
set_hudmessage(255000.450.5020.14.00.10.1, -1)
        
ShowSyncHudMsg(idg_MsgSync2"-%i^n"damage)

#else
    
if ( is_user_connected(attacker) )
    {
        new 
damage read_data(2)
#endif
        
set_hudmessage(0100200, -1.00.5520.14.00.020.02, -1)
        
ShowSyncHudMsg(attackerg_MsgSync"-%i^n"damage)
    }
    return 
PLUGIN_CONTINUE

__________________
Stressful is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 06-16-2011 , 10:42   Re: Editing Bullet Damage From Amx_Super
Reply With Quote #8

Change:
PHP Code:
#if defined DAMAGE_DONE 
to
PHP Code:
#if defined DAMAGE_RECIEVED 
</span></span>
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
Stressful
Senior Member
Join Date: Feb 2011
Old 06-16-2011 , 22:20   Re: Editing Bullet Damage From Amx_Super
Reply With Quote #9

Lol . sorrry my mistake . That DAMAGE_DONE is reeditted by me and I forget to change to original lol . I wanted it to , The player can see the damage to his enemy . But not his enemy damage to him .
__________________
Stressful is offline
Reply



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 00:35.


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