dudas de programacion
#1
Bombilla 
pues, tengo 2 preguntas, que me inquietan por asi decirlo, ya que no se como funcionan Whatever

Como se usan y que tipos de tries hay? No se para que son Koala

y como obtengo el daño de un arma, ejemplo, ej:Bloquear el daño de la HE en el takedamange

si serian tan amables
Si no te gusta algo, cámbialo. Si no lo puedes cambiar, cambia la forma en que piensas sobre ello <3
Responder
#2
sobre el trie toma

https://forums.alliedmods.net/showthread.php?t=203029

lo otro nose
Trolleyes
Responder
#3
Gracias sobre las tries, alguien sabe lo de la HE, lo vi en un pedido de plugins, y me intrigo eso que no se hacerlo.
Si no te gusta algo, cámbialo. Si no lo puedes cambiar, cambia la forma en que piensas sobre ello <3
Responder
#4
si no me equivoco se utiliza

Código PHP:
RegisterHam(Ham_Think"grenade""fw_ThinkGrenade"

seria cuando la entidad de la granada hace explosión

Código PHP:
public fw_ThinkGrenade(entity

    
// Invalid entity 
    
if (!pev_valid(entity)) return HAM_IGNORED
     
    
// Get damage time of grenade 
    
static Float:dmgtime 
    pev
(entitypev_dmgtimedmgtime
     
    
// Check if it's time to go off 
    
if (dmgtime get_gametime()) 
        return 
HAM_IGNORED
     
    
// Not a napalm grenade 
    
if (pev(entityPEV_NADE_TYPE) != NADE_TYPE_NAPALM
        return 
HAM_IGNORED
     
    
// Explode event 
    
napalm_explode(entity
     
    
// Keep the original explosion? 
    
if (g_keepexplosion
    { 
        
set_pev(entityPEV_NADE_TYPE0
        return 
HAM_IGNORED
    } 
     
    
// Get rid of the grenade 
    
engfunc(EngFunc_RemoveEntityentity
    return 
HAM_SUPERCEDE


este es un ejemplo de este post

https://amxmodx-es.com/Thread-Granada-de-fuego
Responder
#5
Biem, pero disculpa mi ignorancia, ejemplo, vi el post de el plugins de crear tele-portales lei sobre el bug de la HE que le tumba el server, entonces, como bloqueo que si es una HE, no la tumbe, no se si se hace en el ham del portal o de la HE, Gracias por la explicacion
Si no te gusta algo, cámbialo. Si no lo puedes cambiar, cambia la forma en que piensas sobre ello <3
Responder
#6
Uff deberia revisar bien y empezar a testear, de estar en lo correcto lo que haria es

Código PHP:
RegisterHam(Ham_Think"grenade""fw_ThinkGrenade"

+ chequear que la entidad es un portal + return HAM_SUPERCEDE;

pero deberia testear, por eso no respondí
Responder
#7
hlsdk_const.inc escribió:
Código PHP:
// Instant damage values for use with gmsgDamage 3rd value write_long(BIT)
#define DMG_GENERIC                     0           // Generic damage was done
#define DMG_CRUSH                       (1<<0)      // Crushed by falling or moving object
#define DMG_BULLET                      (1<<1)      // Shot
#define DMG_SLASH                       (1<<2)      // Cut, clawed, stabbed
#define DMG_BURN                        (1<<3)      // Heat burned
#define DMG_FREEZE                      (1<<4)      // Frozen
#define DMG_FALL                        (1<<5)      // Fell too far
#define DMG_BLAST                       (1<<6)      // Explosive blast damage
#define DMG_CLUB                        (1<<7)      // Crowbar, punch, headbutt
#define DMG_SHOCK                       (1<<8)      // Electric shock
#define DMG_SONIC                       (1<<9)      // Sound pulse shockwave
#define DMG_ENERGYBEAM                  (1<<10)     // Laser or other high energy beam 
#define DMG_NEVERGIB                    (1<<12)     // With this bit OR'd in, no damage type will be able to gib victims upon death
#define DMG_ALWAYSGIB                   (1<<13)     // With this bit OR'd in, any damage type can be made to gib victims upon death.
#define DMG_DROWN                       (1<<14)     // Drowning
#define DMG_PARALYZE                    (1<<15)     // Slows affected creature down
#define DMG_NERVEGAS                    (1<<16)     // Nerve toxins, very bad
#define DMG_POISON                      (1<<17)     // Blood poisioning
#define DMG_RADIATION                   (1<<18)     // Radiation exposure
#define DMG_DROWNRECOVER                (1<<19)     // Drowning recovery
#define DMG_ACID                        (1<<20)     // Toxic chemicals or acid burns
#define DMG_SLOWBURN                    (1<<21)     // In an oven
#define DMG_SLOWFREEZE                  (1<<22)     // In a subzero freezer
#define DMG_MORTAR                      (1<<23)     // Hit by air raid (done to distinguish grenade from mortar)
#define DMG_TIMEBASED                   (~(0x3fff)) // Mask for time-based damage 

Con esto bloqueas el daño de la granada en takedamage (damagebit):
Código PHP:
#define DMG_BLAST 

@Skylar una vez se lo pasé, quizás todavía lo tenga.
[Imagen: b_350_20_323957_202743_f19a15_111111.png]

Estudia siempre; el tiempo es oro, lo material se puede recuperar pero el tiempo no se puede recuperar.
(02/10/2016, 05:05 PM)meTaLiCroSS escribió: Siempre me gusta ayudar cuando alguien esta interesado realmente en ver que esta programando.
(08/08/2019, 05:32 PM)meTaLiCroSS escribió: grax x el dato cr4ck


Mis aportes

PLUGINS
MAPAS
Menú LANG [SF] Sistema de Frags
Say System (Admin Prefix)
Responder
#8
es verdad, habia hecho algo parecido yo, que tonto !

Código PHP:
#include <amxmodx>
#include <hamsandwich>

#define DMG_BLAST  (1<<6) 

public plugin_init()
{
    
RegisterHam(Ham_TakeDamage"player""HamTakeDamage")
}

public 
HamTakeDamage(victimidinflictorattackerFloat:damagedamagebits)
{
    if(
damagebits DMG_BLAST)
        return 
HAM_SUPERCEDE
        
    
return HAM_IGNORED


faltaria chequear si le pegó a un teleport
Responder
#9
ok, gracias a todos. Veré su puedo ayudarle al del teleporte, y así, es un dato mas que anoto Considered
Si no te gusta algo, cámbialo. Si no lo puedes cambiar, cambia la forma en que piensas sobre ello <3
Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)