Witam.
Posiadam kill_assist.amxx (nie ten popularny z neta). Pięknie działa tylko dodaje fraga/asyste dopiero w następnej rundzie. Umie ktoś to przerobić tak, żeby dawało fraga od razu tak jak w tym znanym kill_assist.amxx ?
#include <amxmodx> #include <fakemeta> #include <hamsandwich> #include <fun> #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(i == iKiller) continue; if(g_bAsysta[i][iVictim] >= 45){ set_user_frags(i, get_user_frags(i)+1) } g_bAsysta[i][iVictim] = 0; } } }