Raised This Month: $ Target: $400
 0% 

how add triple kill


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
login_xcvop
Member
Join Date: Nov 2013
Old 01-24-2014 , 14:53   how add triple kill
Reply With Quote #1

how add triple kill in this code ?

PHP Code:
new g_hasKilledTimer[33]

ham_killed(...)
{
   if(
g_hasKilledTimer[attacker])
   {
      
g_hasKilledTimer[attacker] = false

      
// *********************
      // attacker did a double kill
      // add actions here
      // *********************
   
}
   else
   {
      
g_hasKilledTimer[attacker] = true
      set_task
(5.0"resetTimer"attacker)
   }
}

public 
resetTimer(id)
{
     
g_hasKilledTimer[id] = false


Last edited by login_xcvop; 01-25-2014 at 05:20.
login_xcvop is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 01-24-2014 , 16:09   Re: how add triple kill
Reply With Quote #2

Can you show your whole code.?
__________________
Blizzard_87 is offline
login_xcvop
Member
Join Date: Nov 2013
Old 01-25-2014 , 04:27   Re: how add triple kill
Reply With Quote #3

this is full code
login_xcvop is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 01-25-2014 , 08:12   Re: how add triple kill
Reply With Quote #4

If you want to detect 3 kills, why you are using bool? And bool isnt even correctly registered
Register death event msg. after for check do:

PHP Code:
if(g_hasKilledTimer[attacker] > 2)
   {
      
g_hasKilledTimer[attacker] = 0

      
// *********************
      // attacker did a double kill
      // add actions here
      // *********************
   
}
   else
   {
      
g_hasKilledTimer[attacker]++
      
set_task(5.0"resetTimer"attacker)
   }
public 
resetTimer(id)
{
     
g_hasKilledTimer[id] = 0

Sorry for incomplete answer. I havent computer so its complicated
__________________

Last edited by Jhob94; 01-25-2014 at 08:13.
Jhob94 is online now
Reply


Thread Tools
Display Modes

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 10:12.


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