Raised This Month: $51 Target: $400
 12% 

ExecuteHamB(Ham_TakeDamage,


Post New Thread Reply   
 
Thread Tools Display Modes
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 07-04-2010 , 04:07   Re: ExecuteHamB(Ham_TakeDamage,
Reply With Quote #11

Do you even understand what I say?
There are more arguments that you pass there. I can't possibly know what those arguments contain so you must post them. That is not the only problem.

Quote:
Originally Posted by NiHiLaNTh View Post
Shouldnt it be
Code:
ExecuteHam
instead of ExecuteHamB ?
That has nothing to do with his error. Try learning more about HamSandWich.
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.

Last edited by ot_207; 07-04-2010 at 04:12.
ot_207 is offline
pro_on_0
Member
Join Date: Nov 2008
Old 07-04-2010 , 04:18   Re: ExecuteHamB(Ham_TakeDamage,
Reply With Quote #12

PHP Code:
new g_fireattacker[33][10]
 
RegisterHam(Ham_Think"grenade""fw_ThinkGrenade")
// Ham Grenade Think Forward
 
public fw_ThinkGrenade(entity)
{
        
// Invalid entity
        
if (!pev_valid(entity)) return FMRES_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;
 
        
// Check if it's one of our custom nades
        
switch (pev(entityPEV_NADE_TYPE))
        {
                case 
NADE_TYPE_NAPALMfire_explode(entity)
                default: return 
HAM_IGNORED;
        }
 
        return 
HAM_SUPERCEDE;
}
// Fire Grenade Explosion
fire_explode(ent)
{
        
// Get origin
        
static Float:originF[3]
        
pev(entpev_originoriginF)
 
        
// Make the explosion
        
create_blast2(originF)
 
        
// Fire nade explode sound
        
engfunc(EngFunc_EmitSoundentCHAN_WEAPONgrenade_fire[random_num(0sizeof grenade_fire 1)], 1.0ATTN_NORM0PITCH_NORM)
 
        
// Collisions
        
static victim
        victim 
= -1
 
        
while ((victim engfunc(EngFunc_FindEntityInSpherevictimoriginFNADE_EXPLOSION_RADIUS)) != 0)
        {
                
// Only effect alive zombies
                
if (!is_user_alive(victim) || !g_zombie[victim] || g_nogrenade[victim] || g_super_nodamage[victim])
                        continue;
 
                
message_begin(MSG_ONE_UNRELIABLEg_msgDamage_victim)
                
write_byte(0// damage save
                
write_byte(0// damage take
                
write_long(DMG_BURN// damage type
                
write_coord(0// x
                
write_coord(0// y
                
write_coord(0// z
                
message_end()
 
                
// Our task params
                
static params[1]
                if (
g_nemesis[victim])
                {
                        
params[0] = 120
                        client_print
(0print_center"Nemesis is burning !!")
                }
                else if (
g_gmonster[victim])
                {
                        
params[0] = 140
                        client_print
(0print_center"G-Virus Monster is burning !!")
                }
                else if (
g_amonster[victim])
                {
                        
params[0] = 80
                        client_print
(0print_center"Aberrancer is Burning !!")
                }
                else if (
g_smonster[victim])
                {
                        
params[0] = 40
                        client_print
(0print_center"Synthetizer is Burning !!")
                }
                else if (
g_zombieclass[victim] == 1)
                        
params[0] = 160
                
else
                        
params[0] = 80
 
                
static attacker
                attacker 
pev(entpev_owner)
 
                for (new 
010i++)
                {
                        if (
g_fireattacker[victim][i] != 0)
                                continue
                        else
                        {
                                
g_fireattacker[victim][i] = attacker
                                
break
                        }
                }
 
                
// Set burning task on victim
                
set_task(0.1"burning_flame"victim+TASK_BLOODparamssizeof params)
        }
 
        
// Get rid of the grenade
        
engfunc(EngFunc_RemoveEntityent)
}
// Burning Flames
public burning_flame(args[1], taskid)
{
        
// Get player origin and flags
        
static Float:originF[3], flags
        pev
(ID_BLOODpev_originoriginF)
        
flags pev(ID_BLOODpev_flags)
 
        
// Madness mode - in water - burning stopped
        
if ((flags FL_INWATER) || FLAME_DURATION 1)
        {
                
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYoriginF0)
                
write_byte(TE_SMOKE// TE id
                
engfunc(EngFunc_WriteCoordoriginF[0]) // x
                
engfunc(EngFunc_WriteCoordoriginF[1]) // y
                
engfunc(EngFunc_WriteCoordoriginF[2]-50.0// z
                
write_short(g_smokeSpr// sprite
                
write_byte(random_num(1520)) // scale
                
write_byte(random_num(1020)) // framerate
                
message_end()
                return;
        }
 
        
// Get health and fire damage setting
        
static healthcorr_damage
        health 
pev(ID_BLOODpev_health)
 
        if (
g_nemesis[ID_BLOOD])
                
corr_damage health && (havemonster == || g_newmode) ? 5.0 10.0
        
else if (g_gmonster[ID_BLOOD])
                
corr_damage g_gmonster[ID_BLOOD] == 10.0 5.0
        
else
                
corr_damage 10.0
 
        
for (new 010i++)
        {
                if (
g_fireattacker[ID_BLOOD][i] > 0)
                        
ExecuteHamB(Ham_TakeDamageID_BLOODCSW_HEGRENADEg_fireattacker[ID_BLOOD][i], corr_damageDMG_BURN)
        }
 
        
// Flame sprite
        
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYoriginF0)
        
write_byte(TE_SPRITE// TE id
        
engfunc(EngFunc_WriteCoordoriginF[0]+random_float(-50.050.0)) // x
        
engfunc(EngFunc_WriteCoordoriginF[1]) // y
        
engfunc(EngFunc_WriteCoordoriginF[2]+random_float(-50.050.0)) // z
        
write_short(g_flameSpr// sprite
        
write_byte(9// scale
        
write_byte(255// brightness
        
message_end()
 
        
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYoriginF0)
        
write_byte(TE_DLIGHT// TE id
        
engfunc(EngFunc_WriteCoordoriginF[0]) // x
        
engfunc(EngFunc_WriteCoordoriginF[1]) // y
        
engfunc(EngFunc_WriteCoordoriginF[2]) // z
        
write_byte(25// radius
        
write_byte(255// r
        
write_byte(0// g
        
write_byte(0// b
        
write_byte(2// life
        
write_byte(0// decay rate
        
message_end()
 
        
// Decrease task cycle counter
        
FLAME_DURATION -= 1;
 
        
// Keep sending flame messaegs
        
set_task(0.1"burning_flame"taskidargssizeof args)

pro_on_0 is offline
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 07-04-2010 , 04:33   Re: ExecuteHamB(Ham_TakeDamage,
Reply With Quote #13

Again I try to tell you to post the plugin code and you still give me chunks.
I can't help you because I do not know who ID_BLOOD is. If you do not want help you can say so because this is the third time I tell you to post the plugin.
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.
ot_207 is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 07-04-2010 , 13:33   Re: ExecuteHamB(Ham_TakeDamage,
Reply With Quote #14

Like Connor said, you have to pass an entity not the weapon ID.

Where you have CSW_HEGRENADE pass something like
PHP Code:
create_entity("grenade"
.

You might have to set some data on it to make it an HE so the death message in the HUD comes correctly but give it a shot anyway.

Edit:

I saw your code and the you should (and that what I guess you want to do) pass the grenade you have in the function that calls the function where you have the issue.
Change

PHP Code:
static params[1
by

PHP Code:
new params[2]
params[1] = ent 
and

PHP Code:
args[1
by

PHP Code:
args[2
and make it

PHP Code:
 ExecuteHamB(Ham_TakeDamageID_BLOODargs[1], g_fireattacker[ID_BLOOD][i], corr_damageDMG_BURN

__________________

Last edited by joaquimandrade; 07-04-2010 at 13:41.
joaquimandrade is offline
pro_on_0
Member
Join Date: Nov 2008
Old 07-05-2010 , 07:24   Re: ExecuteHamB(Ham_TakeDamage,
Reply With Quote #15

Sorry, it didn't work

L 07/05/2010 - 19:13:58: [HAMSANDWICH] Invalid entity (87)
pro_on_0 is offline
pro_on_0
Member
Join Date: Nov 2008
Old 07-05-2010 , 22:25   Re: ExecuteHamB(Ham_TakeDamage,
Reply With Quote #16

It's ok now

I change engfunc(EngFunc_RemoveEntity, ent)
to engfunc(EngFunc_SetModel, ent, "")

and then it works

Thank you for your help
pro_on_0 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:03.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode