Raised This Month: $ Target: $400
 0% 

How to get user data on how much players he killed?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Natsheh
Veteran Member
Join Date: Sep 2012
Old 02-18-2017 , 14:51   Re: How to get user data on how much players he killed?
Reply With Quote #9

Quote:
Originally Posted by edon1337 View Post
Yes.



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

#define HP_LIMIT 150.0

const Float:hp_value 30.0

new bool:g_Enabled33 ];

public 
plugin_init( ) {

    
register_plugin"Extra HP""1.0""DoNii" );

    
register_clcmd"say /health""enable_plugin" );

    
RegisterHamHam_Killed"player""fw_HamKilledPost");
}

public 
enable_plugin(id) {

    
g_Enabledid ] = true
}

public 
fw_HamKilledPostvictimattackershouldgib ) {

    if( 
g_Enabledattacker ] ) {

        new 
Float:health entity_get_floatattackerEV_FL_health )

        if( 
health HP_LIMIT ) {
            return 
HAM_IGNORED;
        } 
        
        
entity_set_floatattackerEV_FL_healthhealth hp_value )
    }  

    return 
HAM_IGNORED;

Attacker health can be more than the limit
Check again
PHP Code:
    if( g_Enabledattacker ] ) {

        new 
Float:health entity_get_floatattackerEV_FL_health ) + hp_value

        
if( health HP_LIMIT ) {
            
health HP_LIMIT
        

        
        
entity_set_floatattackerEV_FL_healthhealth)
    } 
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 02-18-2017 at 14:56.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
 



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 21:01.


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