Raised This Month: $ Target: $400
 0% 

Detect killed x amount of players.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Dores
Veteran Member
Join Date: Jun 2008
Location: You really don't wanna k
Old 01-26-2009 , 09:41   Re: Detect killed x amount of players.
Reply With Quote #2

Code:
#include <amxmodx> new g_iKills[33], g_iMaxPlayers; public plugin_init() {     register_event("DeathMsg", "ev_Death", "a");     register_event("HLTV", "ev_newRound", "a", "1=0", "2=0");         g_iMaxPlayers = get_maxplayers(); } public ev_Death() {     static iAtt ; iAtt = read_data(1);         if((1 <= iAtt <= g_iMaxPlayers))     {         g_iKills[iAtt]++;     } } public ev_newRound() {     for(new i = 1 ; i <= g_iMaxPlayers ; i++)     {         if(is_user_connected(i))         {             static name[32] ; get_user_name(i, name, charsmax(name));             client_print(0, print_chat, "[Kill Test] %s had %d kills this round.", name, g_iKills[i]);                         g_iKills[i] = 0;         }     } } public client_disconnect(id) {     g_iKills[id] = 0; }
__________________
O o
/Ż________________________
| IMMA FIRIN' MAH LAZOR!!!
\_ŻŻŻ
Dores 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 01:44.


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