Raised This Month: $ Target: $400
 0% 

Grenade Bonus


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-08-2010 , 00:37   Re: Grenade Bonus
Reply With Quote #3

I added an is_user_connected() check to prevent an error if a player tosses a killing nade and he disconnects before the kill occurs. You will need to include cstrike module.
PHP Code:
#include <amxmodx>
#include <fun>
#include <cstrike>

register_event"DeathMsg" "playerDeath" "a" "1>0" )

public 
playerDeath()
{
    new 
iKiller read_data);
    new 
iVictim read_data);
    new 
szWeapon]; read_dataszWeapon charsmaxszWeapon ) );
 
    if ( ( 
iKiller != iVictim ) && equalszWeapon "grenade" ) && is_user_connectediKiller ) && !cs_get_user_bpammoiKiller CSW_HEGRENADE ) )
    {
        
give_itemiKiller "weapon_hegrenade" );
    }

__________________

Last edited by Bugsy; 05-08-2010 at 00:45.
Bugsy 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