Mensajes: 449
Temas: 32
Registro en: Apr 2017
Reputación:
6
08/07/2018, 10:44 PM
(Última modificación: 08/07/2018, 10:44 PM por Saber.)
pues, tengo 2 preguntas, que me inquietan por asi decirlo, ya que no se como funcionan
Como se usan y que tipos de tries hay? No se para que son
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
Mensajes: 449
Temas: 66
Registro en: Aug 2016
Reputación:
3
Mensajes: 449
Temas: 32
Registro en: Apr 2017
Reputación:
6
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
Mensajes: 1,867
Temas: 57
Registro en: Oct 2014
Reputación:
16
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(entity, pev_dmgtime, dmgtime) // Check if it's time to go off if (dmgtime > get_gametime()) return HAM_IGNORED; // Not a napalm grenade if (pev(entity, PEV_NADE_TYPE) != NADE_TYPE_NAPALM) return HAM_IGNORED; // Explode event napalm_explode(entity) // Keep the original explosion? if (g_keepexplosion) { set_pev(entity, PEV_NADE_TYPE, 0) return HAM_IGNORED; } // Get rid of the grenade engfunc(EngFunc_RemoveEntity, entity) return HAM_SUPERCEDE; }
este es un ejemplo de este post
https://amxmodx-es.com/Thread-Granada-de-fuego
Mensajes: 449
Temas: 32
Registro en: Apr 2017
Reputación:
6
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
Mensajes: 1,867
Temas: 57
Registro en: Oct 2014
Reputación:
16
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í
Mensajes: 4,247
Temas: 94
Registro en: Mar 2014
Reputación:
58
09/07/2018, 08:53 PM
(Última modificación: 09/07/2018, 08:53 PM por totopizza.)
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):
@Skylar una vez se lo pasé, quizás todavía lo tenga.
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
PLUGINSMAPAS
Menú LANG
[SF] Sistema de Frags
Say System (Admin Prefix)
Mensajes: 1,867
Temas: 57
Registro en: Oct 2014
Reputación:
16
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(victim, idinflictor, attacker, Float:damage, damagebits) { if(damagebits & DMG_BLAST) return HAM_SUPERCEDE return HAM_IGNORED }
faltaria chequear si le pegó a un teleport
Mensajes: 449
Temas: 32
Registro en: Apr 2017
Reputación:
6
ok, gracias a todos. Veré su puedo ayudarle al del teleporte, y así, es un dato mas que anoto
Si no te gusta algo, cámbialo. Si no lo puedes cambiar, cambia la forma en que piensas sobre ello <3
|