AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Detect killed x amount of players. (https://forums.alliedmods.net/showthread.php?t=84451)

xbatista 01-26-2009 09:30

Detect killed x amount of players.
 
How to detect example,I've killed on this round x players?

Dores 01-26-2009 09:41

Re: Detect killed x amount of players.
 
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; }

xbatista 01-26-2009 09:42

Re: Detect killed x amount of players.
 
WoW thx!


All times are GMT -4. The time now is 01:44.

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