Raised This Month: $ Target: $400
 0% 

help me edit a script!!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mikaelnatan13
Member
Join Date: Apr 2020
Old 06-04-2020 , 23:22   Re: help me edit a script!!
Reply With Quote #1

Quote:
Originally Posted by Bugsy View Post
You should have posted in Suggestions/Requests if you are not trying to code this yourself.

Here's what I just said, see if you can figure out where it goes.
PHP Code:
//Make this global (placed towards the top of the plugin, delete xDamage in the xOnDamage function
new xDamageMAX_PLAYERS 

//Replace 
xDamage read_data(2)
//with
xDamagexAttacker ] += read_data
it would look something 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 
xAttackerxDamage
    
    xAttacker 
get_user_attacker(id)
    
xDamagexAttacker ] += read_data
    
    
set_hudmessage(255000.450.5000.13.00.10.1)
    
ShowSyncHudMsg(idxMsgSync[1], "%i"xDamage)    
    
    if(
is_user_connected(xAttacker))
    {
        
set_hudmessage(0100200, -1.00.5500.13.00.020.02)
        
ShowSyncHudMsg(xAttackerxMsgSync[0], "%i"xDamage)        
    }


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