Raised This Month: $ Target: $400
 0% 

Double kill with a grenade


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-07-2011 , 16:54   Re: Double kill with a grenade
Reply With Quote #1

I prefer this method:
Code:
#include <amxmodx> #include <csx> #include <hamsandwich> new g_grenadeKills[33] public plugin_init() {     RegisterHam(Ham_Think, "grenade", "FwdGrenadeThink") } public FwdGrenadeThink(ent) {     if(!pev(ent, pev_bInDuck)) {         new Float:dmgtime         pev(ent, pev_dmgtime, dmgtime)                 if(dmgtime <= get_gametime()) {             g_grenadeKills[pev(ent, pev_owner)] = 0             set_pev(ent, pev_bInDuck, 1)         }     } } public client_death(victim, killer, weapon, hitPlace, teamKill) {     if(weapon == CSW_HEGRENADE && ++g_grenadeKills[killer] > 1) {         // more than 1 kill for nade     } }

The only difference with my method is that you can't properly check for more than 1 kill number without using tasks and more stuff.
But with bugsy's code, it's easy to check for more than 1 kill number.
(By more than 1 kill number, I mean checking for 2 or 3 kills)
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 03:25.


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