←  Problemy

AMXX.pl: Support AMX Mod X i SourceMod

»

CoD Nowy
Problemy 1/1 z kosy

  • +
  • -
NapiszMiPlugina's Photo NapiszMiPlugina 18.07.2015

Witam , mam problem ponieważ mam coda 4001 lvl oczywiście duzo wyytrzymalosci i 1/1 z kosy nie działa znacie moze inny sposób na naprawe tego?

Attached Files

Quote

  • +
  • -
aRrOw's Photo aRrOw 18.07.2015

Zamień na to

public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits)

{

if(!is_user_connected(idattacker))

return HAM_IGNORED;



if(!ma_klase[idattacker])

return HAM_IGNORED;



if(get_user_weapon(idattacker) == CSW_KNIFE && damagebits & DMG_BULLET && !(get_user_button(idattacker) & IN_ATTACK))

cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);



return HAM_IGNORED;

}
Quote

  • +
  • -
Alelluja's Photo Alelluja 19.07.2015

Dodaj:

 

#include <fakemeta_util>

 

 

Dodaj do plugin_init:

 

RegisterHam(Ham_TakeDamage, "player", "TakeDamage");

 

I public na samym końcu to jest PPM:

 

public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits){
    if(!is_user_connected(idattacker))
        return HAM_IGNORED;
    
    if(!ma_klase[idattacker])
        return HAM_IGNORED;
        
    if(get_user_weapon(idattacker) == CSW_KNIFE && damagebits & DMG_BULLET && !(pev(idattacker, pev_button) & IN_ATTACK))
        cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);
        
    return HAM_IGNORED;
}

 

LPM:

 

public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits){
    if(!is_user_connected(idattacker))
        return HAM_IGNORED;
    
    if(!ma_klase[idattacker])
        return HAM_IGNORED;
        
    if(get_user_weapon(idattacker) == CSW_KNIFE && damagebits & DMG_BULLET && !(pev(idattacker, pev_button) & IN_ATTACK2))
        cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);
        
    return HAM_IGNORED;
}

Quote