Raised This Month: $ Target: $400
 0% 

small request about money and hp for kills


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Larcyn
Senior Member
Join Date: Oct 2010
Old 12-10-2011 , 11:00   Re: small request about money and hp for kills
Reply With Quote #1

PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fun>

public plugin_init() 
{
    
register_plugin("Admin Extra Money""1.0.0""Larcyn")
    
register_event("DeathMsg""Event_DeathMsg""a")
}

public 
Event_DeathMsg()
{
    new 
iKiller read_data(1)
    new 
iVictim read_data(2)
    new 
iHs read_data(3)
    
    if(
cs_get_user_team(iKiller) == cs_get_user_team(iVictim) || (!get_user_flags(iKiller) && ADMIN_LEVEL_G))
        return 
PLUGIN_HANDLED
    
    
if(is_user_alive(iKiller))
    {
        
cs_set_user_money(iKillercs_get_user_money(iKiller) + (iHs) ? 1000 500)
        
set_user_health(iKillerget_user_health(iKiller) + (iHs) ? 70 50)
    }
    return 
PLUGIN_CONTINUE

Untested.
__________________

Taking private requests, PM me for information.
Selling HideNSeek & Jailbreak plugins.

Selling Achievement API System (PHP &
MySQL / nVault)

Last edited by Larcyn; 12-10-2011 at 11:07. Reason: Optimized
Larcyn 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 20:52.


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