Raised This Month: $ Target: $400
 0% 

help me edit a script!!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 06-04-2020 , 23:27   Re: help me edit a script!!
Reply With Quote #1

You forgot to delete xDamage in xOnDamge. "static xAttacker , xDamage" , delete ", xDamage"

And everywhere else you see xDamage in xOnDamage, you need to change it to xDamage[ xAttacker ]. This will reflect the total damage issued, not the single amount of damage.
__________________
Bugsy is offline
mikaelnatan13
Member
Join Date: Apr 2020
Old 06-04-2020 , 23:35   Re: help me edit a script!!
Reply With Quote #2

Quote:
Originally Posted by Bugsy View Post
You forgot to delete xDamage in xOnDamge. "static xAttacker , xDamage" , delete ", xDamage"

And everywhere else you see xDamage in xOnDamage, you need to change it to xDamage[ xAttacker ]. This will reflect the total damage issued, not the single amount of damage.
like this
PHP Code:
#include <amxmodx>

#define PLUGIN "CS Revo: Danos causados"
#define VERSION "1.0"
#define AUTHOR "Wilian M."

new xMsgSync[2]
new 
xDamageMAX_PLAYERS ]

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_event("Damage""xOnDamage""b""2!0""3=0""4!0")    
    
    
xMsgSync[0] = CreateHudSyncObj()    
    
xMsgSync[1] = CreateHudSyncObj()
}

public 
xOnDamage(id)
{
    static 
xAttacker
    
    xAttacker 
get_user_attacker(id)
    
xDamagexAttacker ] += read_data
    
    
set_hudmessage(255000.450.5000.13.00.10.1)
    
ShowSyncHudMsg(idxMsgSync[1], "%i"xDamage [xAttacker])    
    
    if(
is_user_connected(xAttacker))
    {
        
set_hudmessage(0100200, -1.00.5500.13.00.020.02)
        
ShowSyncHudMsg(xAttackerxMsgSync[0], "%i"xDamage [xAttacker])        
    }


Last edited by mikaelnatan13; 06-04-2020 at 23:38.
mikaelnatan13 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 16:57.


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