#include <amxmodx> #include <fakemeta> #include <hamsandwich> #include <fun> #include <ColorChat> #define VERSION "0.1" #define MAX 32 #define IsPlayer(%1) (1 <= %1 <= MAX && is_user_connected(%1)) new g_bAsysta[MAX+1][MAX+1]; public plugin_init() { register_plugin("Dodatkowy Exp", VERSION, "DarkGL") register_event("DeathMsg", "eventDeath", "a"); register_event("HLTV", "newRound", "a", "1=0", "2=0") RegisterHam(Ham_TakeDamage, "player", "fwDamage", 1); } public newRound() { for(new i = 0;i <= MAX;i++){ for(new j = 0;j <= MAX;j++) g_bAsysta[i][j] = 0; } } public client_connect(id){ for(new j = 0;j <= MAX;j++) g_bAsysta[id][j] = 0; } public fwDamage(iVictim, iInflicter, iAttacker, Float:fDamage, iBitDamage){ if( (IsPlayer(iAttacker) && IsPlayer(iVictim)) && get_user_team(iVictim) != get_user_team(iAttacker) && iVictim != iAttacker) g_bAsysta[iAttacker][iVictim] += floatround(fDamage); return HAM_IGNORED; } public eventDeath(){ new iKiller = read_data(1); new iVictim = read_data(2); if(IsPlayer(iKiller) && IsPlayer(iVictim) && iKiller != iVictim) { new sName[32]; get_user_name(iVictim, sName, sizeof sName - 1); for(new i = 0 ; i <= MAX; i ++){ if(is_user_connected(i) || i == iKiller) continue; if(g_bAsysta[i][iVictim] >= 50){ ColorChat(i, GREEN, "[*]^x01 Asystowales w zabiciu gracza^x04 %s^x01 (^x03 + 1 Frag^x01 )", sName); set_user_frags(i, get_user_frags(i)+1) } g_bAsysta[i][iVictim] = false; } } }
Do usunięcia, przepraszam za kłopot.
Użytkownik ` Anonymous. edytował ten post 04.05.2016 14:22