Raised This Month: $ Target: $400
 0% 

Grenade Bonus


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
HLM
Senior Member
Join Date: Apr 2008
Location: C:\WINDOWS\System32
Old 05-08-2010 , 00:27   Re: Grenade Bonus
Reply With Quote #2

untested, but this should explain it a bit more..

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fun>

#define PLUGIN "Grenade Bonus"
#define VERSION "1.0"
#define AUTHOR "OptimuS"

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_event("DeathMsg""playerDeath""a""1>0")
}

public 
playerDeath()
{
    new 
killer read_data(1//get the fragger's _index_
    
new victim read_data(2//get the dead persons index
    
new weapon[8]
    
read_data(4weapon7)
 
    if (
killer != victim && equal(weapon"grenade"))
    {
        new 
clipammo
        
//new const uid = get_user_index(killer) //not needed since killer = uid
        
get_user_ammo(killerCSW_HEGRENADEclipammo)
        if(
ammo == 0)
        {
            
give_item(killer"weapon_hegrenade")
        }
    }

        

__________________
+|- KARMA Respectively

HLM is offline
 



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 03:45.


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