Raised This Month: $12 Target: $400
 3% 

Time of Death


Post New Thread Reply   
 
Thread Tools Display Modes
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 10-07-2010 , 17:42   Re: Time of Death
Reply With Quote #11

This could be named "Victim hunt time" or something, time of death sounds like the actual system time when the plyer died O.o

Still, you should recode it, use a double array with 33 cells each... a wth, let me give you an example:

Code:
new g_iMaxPlayers
new Float:g_fFirstDamageTime[33][33]

//...

public plugin_init()
{
   //... hooks and stuff

   g_iMaxPlayers = get_maxplayers()
}

public player_spawn(id)
{
   if(!is_user_alive(id))
      return

   for(new i = 1; i <= g_iMaxPlayers; i++)
      g_fFirstDamageTime[id][i] = 0.0
}

public player_damage(id, attacker)
{
   if(1 <= attacker <= g_iMaxPlayers && !g_fFirstDamageTime[attacker][id])
      g_fFirstDamageTime[attacker][id] = get_gametime()
}

public player_death(id, killer)
{
   if(!(1 <= killer <= g_iMaxPlayers))
      return

   client_print(killer, print_chat, "It took you %.1f seconds to kill <name here>", get_gametime() - g_fFirstDamageTime[killer][id])

   g_fFirstDamageTime[killer][id] = 0.0
}
... something like that.
__________________
Hunter-Digital is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-30-2010 , 21:26   Re: Time of Death
Reply With Quote #12

This plugin seems not be maintained. You should follow the Exolent[jNr]'s suggestion. Also, it's poorly coded.

Unapproved until you fix the plugin.
__________________
Arkshine 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 05:53.


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