Raised This Month: $ Target: $400
 0% 

combined kills????


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
flyeni6
Senior Member
Join Date: Jun 2006
Location: CAli
Old 05-27-2007 , 13:55   combined kills????
Reply With Quote #1

how can i get the combined kills of a team.

like if a team gets 50 kills the game will restart

thx
__________________


Last edited by flyeni6; 05-27-2007 at 20:14.
flyeni6 is offline
Send a message via AIM to flyeni6
flyeni6
Senior Member
Join Date: Jun 2006
Location: CAli
Old 05-27-2007 , 20:16   Re: combined kills????
Reply With Quote #2

anyone know how to do this?
__________________

flyeni6 is offline
Send a message via AIM to flyeni6
Old 05-27-2007, 20:31
regalis
This message has been deleted by regalis. Reason: start thinking! and be nice to the people who helps you!
Cheap_Suit
Veteran Member
Join Date: May 2004
Old 05-27-2007 , 20:54   Re: combined kills????
Reply With Quote #4

Quote:
Originally Posted by regalis View Post
What do you think how to do this?
I think you are human, and humans are capable to think..so what do you THINK how to do that?
That's just wrong.

@ flyeni6 : something like this. It will check each teams kills everytime someone died.
PHP Code:
public plugin_init()
{
 
register_plugin(PLUGINVERSIONAUTHOR)
 
register_event("DeathMsg""event_death""a")
}
 
public 
event_death()
{
 static 
players[32], numiidtotal_kills
 
 get_players
(playersnum"e""T")
 
total_kills 0
 
 
for(0num; ++i)
 {
  
id players[i]
  
total_kills += get_user_frags(id)
 }
 
 if(
total_kills >= 50)
 {
  
client_print(0print_chat"The terrorist reached 50 kills")
  
server_cmd("sv_restart 5")
 }
 
 
get_players(playersnum"e""CT")
 
total_kills 0
 
 
for(0num; ++i)
 {
  
id players[i]
  
total_kills += get_user_frags(id)
 }
 
 if(
total_kills >= 50)
 {
  
client_print(0print_chat"The Counter-Terrorist reached 50 kills")
  
server_cmd("sv_restart 5")
 }
 

__________________
HDD fried, failed to backup files. Sorry folks, just don't have free time anymore. This is goodbye.

Last edited by Cheap_Suit; 05-27-2007 at 20:57.
Cheap_Suit is offline
Old 05-27-2007, 21:05
flyeni6
This message has been deleted by flyeni6. Reason: mybad a little pissed too lol
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 05-27-2007 , 21:12   Re: combined kills????
Reply With Quote #6

I wouldn't check the users frags, because you get 3 frags for bombing the bombspot or defusing the bomb...
I would save the kills in a global variable...
Btw.: ignore my last post...im a little pissed off because last time i helped you i got no response if it works and no karma for my work...i hate that
__________________
regalis is offline
flyeni6
Senior Member
Join Date: Jun 2006
Location: CAli
Old 05-27-2007 , 21:17   Re: combined kills????
Reply With Quote #7

lol i can't give karma no more anyways lol.

but thanks you guys for your help
__________________

flyeni6 is offline
Send a message via AIM to flyeni6
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 05-27-2007 , 21:21   Re: combined kills????
Reply With Quote #8

Quote:
Originally Posted by flyeni6 View Post
lol i can't give karma no more anyways lol.

but thanks you guys for your help
i can...
__________________
regalis is offline
Cheap_Suit
Veteran Member
Join Date: May 2004
Old 05-27-2007 , 21:21   Re: combined kills????
Reply With Quote #9

Oh yea. Then all you have to do is record the players kills when he kills another player and add that instead of using get_user_frags function.
__________________
HDD fried, failed to backup files. Sorry folks, just don't have free time anymore. This is goodbye.
Cheap_Suit is offline
Lee
AlliedModders Donor
Join Date: Feb 2006
Old 05-27-2007 , 21:35   Re: combined kills????
Reply With Quote #10

Code:
#include <amxmodx> #include <amxmisc> #include <cstrike> #define KILL_LIMIT 50 new terrorist_kills, ct_kills public plugin_init() {     register_plugin("Restart On x Kills", "1.0", "Lee") } public client_death(killer, victim, wpnindex, hitplace, TK) {     switch(cs_get_user_team(killer))     {         case CS_TEAM_T: terrorist_kills++         case CS_TEAM_CT: ct_kills++     }         if(terrorist_kills >= KILL_LIMIT || ct_kills >= KILL_LIMIT)     {         terrorist_kills = 0         ct_kills = 0         server_cmd("sv_restart 5")     } }
Code:
#include <amxmodx> #include <amxmisc> #include <cstrike> #define KILL_LIMIT 50 new terrorist_kills, ct_kills public plugin_init() {     register_plugin("Restart On x Kills", "1.0", "Lee") } public client_death(killer, victim, wpnindex, hitplace, TK) {     switch(cs_get_user_team(killer))     {         case CS_TEAM_T:                         if(++terrorist_kills >= KILL_LIMIT)             {                 kill_limit_reached()                 client_print(0, print_chat, "The terrorist team have reached %d kills..", KILL_LIMIT)             }                         case CS_TEAM_CT:                         if(++ct_kills >= KILL_LIMIT)             {                 kill_limit_reached()                 client_print(0, print_chat, "Counter-Terrorists have reached %d kills..", KILL_LIMIT)             }     } } public kill_limit_reached() {     terrorist_kills = 0     ct_kills = 0     server_cmd("sv_restart 5") }

Last edited by Lee; 05-27-2007 at 21:39.
Lee 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 01:27.


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