←  Szukam pluginu

AMXX.pl: Support AMX Mod X i SourceMod

»

DMG HE

  • +
  • -
Pazdzioch - zdjęcie Pazdzioch 21.02.2012

witam, poszukuje pluginy, którym moge zmniejszyc obrazenia z he granade, np. max do 50
Odpowiedz

  • +
  • -
Syczaj - zdjęcie Syczaj 21.02.2012

#include <amxmodx>
#include <hamsandwich>

new g_MaxDmg;

public plugin_init(){
register_plugin("Custom_damage", "1.1", "Syczaj");
RegisterHam(Ham_TakeDamage, "player", "Player_TakeDamage", 1);
g_MaxDmg = register_cvar("amx_he_maxdmg", "50");
}

public fwTakeDamage(this, idinflictor, idattacker, damage, damagebits){
if(damagebits == (1<<24) && damage > g_MaxDmg){

SetHamParamInteger(4, g_MaxDmg);
return HAM_IGNORED;
}
return HAM_IGNORED;
}


cvarem amx_he_dmg ustawiasz maxymalne mozliwe obrazenia zadawane z HE.
Odpowiedz

  • +
  • -
Pazdzioch - zdjęcie Pazdzioch 21.02.2012

syczaj, ten plugin nie dziala, dalej sa takie same obrazenia, a co do ciebie nakupenda to chce sam do he a nie do wszystkich broni .
Odpowiedz

Oporowiec - zdjęcie Oporowiec 21.02.2012

to co podal Nakupenda. jest dobre, tylko ustaw cvar do HE -,-
Odpowiedz

  • +
  • -
Syczaj - zdjęcie Syczaj 21.02.2012

#include <amxmodx>
#include <hamsandwich>

new g_MaxDmg;

public plugin_init(){
register_plugin("Custom_damage", "1.1", "Syczaj");
RegisterHam(Ham_TakeDamage, "player", "Player_TakeDamage", 0);
g_MaxDmg = register_cvar("amx_he_maxdmg", "50");
}

public fwTakeDamage(this, idinflictor, idattacker, damage, damagebits){
if(damagebits == (1<<24) && damage > g_MaxDmg){

SetHamParamInteger(4, g_MaxDmg);
return HAM_IGNORED;
}
return HAM_IGNORED;
}


Teraz już pójdzie, jeśli aktualne.
Odpowiedz

  • +
  • -
sebul - zdjęcie sebul 22.02.2012

#include <amxmodx>
#include <hamsandwich>

new g_MaxDmg;

public plugin_init(){
register_plugin("Custom_damage", "1.1", "Syczaj");
RegisterHam(Ham_TakeDamage, "player", "Player_TakeDamage", 0);
g_MaxDmg = register_cvar("amx_he_maxdmg", "50");
}

public fwTakeDamage(this, idinflictor, idattacker, damage, damagebits){
if(damagebits == (1<<24) && damage > g_MaxDmg){

SetHamParamInteger(4, g_MaxDmg);
return HAM_IGNORED;
}
return HAM_IGNORED;
}


Teraz już pójdzie, jeśli aktualne.

:facepalm:

#include <amxmodx>
#include <hamsandwich>

new g_MaxDmg;

public plugin_init() {
register_plugin("Custom_damage", "1.1", "Syczaj");
RegisterHam(Ham_TakeDamage, "player", "Player_TakeDamage", 0);
g_MaxDmg = register_cvar("amx_he_maxdmg", "50");
}

public Player_TakeDamage(this, idinflictor, idattacker, damage, damagebits) {
static he_damage; he_damage = get_pcvar_num(g_MaxDmg);
if(damagebits & (1<<24) && damage > he_damage) {
SetHamParamInteger(4, he_damage);
return HAM_HANDLED;
}
return HAM_IGNORED;
}

Nie wiem czy można w tej funkcji damage dawać jako int, jak to wyżej nie będzie działać, to spróbuj z tym
#include <amxmodx>
#include <hamsandwich>

new g_MaxDmg;

public plugin_init() {
register_plugin("Custom_damage", "1.1", "Syczaj");
RegisterHam(Ham_TakeDamage, "player", "Player_TakeDamage", 0);
g_MaxDmg = register_cvar("amx_he_maxdmg", "50");
}

public Player_TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits) {
static Float:he_damage; he_damage = get_pcvar_float(g_MaxDmg);
if(damagebits & (1<<24) && damage > he_damage) {
SetHamParamFloat(4, he_damage);
return HAM_HANDLED;
}
return HAM_IGNORED;
}
Odpowiedz