←  Pluginy

AMXX.pl: Support AMX Mod X i SourceMod

»

Modyfikacja
Prośba o przerobienie pluginu asysta_i_zem...

  • +
  • -
krol - zdjęcie krol 14.03.2015

Witam. Chciałbym aby ktoś mógł mi przerobić plugin asyst Darka. Chciałbym żeby asyste dodawało przy zabraniu 50hp.

Załączone pliki

Odpowiedz

  • +
  • -
krol - zdjęcie krol 19.03.2015

Pomoże ktoś ?

Odpowiedz

  • +
  • -
Alelluja - zdjęcie Alelluja 19.03.2015

#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] >= 50){        
                
                set_hudmessage
(255, 16, 255, -1.0, 0.30, 0, 2.0, 2.0, 0.05, 0.05, 4)
                show_hudmessage(i, "Asystowales w zabiciu gracza %s^n^n+ 1 Frag", sName);
                
                set_user_frags
(i, get_user_frags(i)+1)
            }
            
            g_bAsysta
[i][iVictim] = 0;
        }
    }
}

Odpowiedz