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

Entity only takedamage from knife


Post New Thread Reply   
 
Thread Tools Display Modes
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 07-18-2018 , 17:45   Re: Entity only takedamage from knife
Reply With Quote #11

Quote:
Originally Posted by Ghosted View Post
:*, that's about model index, you are shooting up & missing shots cause modelindex size is not so big. I though printed damage was zero.
OK. Here is the new one.


I also added set_pev(Ent, pev_modelindex, g_ModelIndex) too.
__________________
My plugin:
Celena Luna is offline
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 07-18-2018 , 17:48   Re: Entity only takedamage from knife
Reply With Quote #12

Quote:
Originally Posted by Celena Luna View Post
OK. Here is the new one.


I also added set_pev(Ent, pev_modelindex, g_ModelIndex) too.
I need revenant model
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM
Ghosted is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 07-18-2018 , 17:50   Re: Entity only takedamage from knife
Reply With Quote #13

Here you go.
I started thinking it is the model is error.
Attached Files
File Type: zip revenant.zip (676.3 KB, 80 views)
__________________
My plugin:
Celena Luna is offline
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 07-18-2018 , 17:56   Re: Entity only takedamage from knife
Reply With Quote #14

Well my revenant zombie got red i think hes angry now : https://youtu.be/keb2tzyZxRk
You can show full code if you have doubt
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM

Last edited by Ghosted; 07-18-2018 at 17:59.
Ghosted is offline
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 07-18-2018 , 18:03   Re: Entity only takedamage from knife
Reply With Quote #15

Code?

Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <hamsandwich>
#include <fakemeta>
#include <engine>
#include <xs>

public plugin_init()
{
	register_clcmd("say n", "create_revenant");
}
new mi;
public plugin_precache()
{
	mi = precache_model( "models/NPC/revenant.mdl");
}
public create_revenant(id) 
{ 
	new Float:pOrigin[3];
	entity_get_vector(id, EV_VEC_origin, pOrigin);
	pOrigin[0] -= 100.0;
	pOrigin[2] += 200.0;
	static Ent; Ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target")) 
	if(!pev_valid(Ent)) return 
	set_pev(Ent, pev_origin, pOrigin) //Appear in right Origin 
	
	set_pev(Ent, pev_angles, {0.0,0.0,0.0}) //Appear in right Angel 
	
	set_pev(Ent, pev_health, 100.0) //Correct Health 
	
	set_pev(Ent, pev_classname, "monter_revenant") //Think works so Classname is correct 
	engfunc(EngFunc_SetModel, Ent, "models/NPC/revenant.mdl") //Appear in right model 
	set_pev(Ent, pev_solid, SOLID_BBOX) //Touchable 
	
	set_pev(Ent, pev_movetype, MOVETYPE_PUSHSTEP) //(how to check this?) 
	set_pev(Ent, pev_gamestate, 1) //Turn on or off doesn't effect 
	set_pev(Ent, pev_iuser1, 0) //pev_state = pev_iuser1 
	
	set_pev(Ent, pev_takedamage, 1.0)  
	static Float:Takedamage; pev(Ent, pev_takedamage, Takedamage) 
	client_print(0, print_chat, "TAKEDAMAGE: %f", Takedamage) //printed 1.0 
	set_pev(Ent, pev_modelindex, mi);
	static Float:Maxs[3], Float:Mins[3] 
	Maxs[0] = 75.0; 
	Maxs[1] = 75.0; 
	Maxs[2] = 120.0 
	Mins[0] = -75.0; 
	Mins[1] = -75.0; 
	Mins[2] = -150.0; 
	entity_set_size(Ent, Mins, Maxs) //Can jump above so the hitbox is correct 
	// Play_Animation(Ent, ANIME_APPEAR) //Did run the animation 
	
	//emit_sound(Ent, CHAN_BODY, GiantSounds[3], VOL_NORM, ATTN_NORM, 0, PITCH_NORM) 
	
	//static Float:Origin[3]; pev(Ent, pev_origin, Origin) 
	//Origin[2] += 36.0 
	//Create_Rock(Origin) 
	
	drop_to_floor(Ent) 
	entity_set_float(Ent, EV_FL_nextthink, get_gametime() + 5.5) 
	
	RegisterHamFromEntity(Ham_TakeDamage, Ent, "fw_BossTakeDamage") //Does show damage on knifing 
	
}  


public fw_BossTakeDamage(victim, inflictor, attacker, Float:damage, damagebits)
{
	//static Float:Origin[3]
	//fm_get_aim_origin(attacker, Origin)
	//create_blood(Origin)
	client_print(attacker, print_center, "%.f", damage)
}
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM
Ghosted is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 07-18-2018 , 18:03   Re: Entity only takedamage from knife
Reply With Quote #16

It is really simple.
Nothing special so far.
Attached Files
File Type: sma Get Plugin or Get Source (ZE_Boss_Revenant.sma - 330 views - 8.1 KB)
__________________
My plugin:
Celena Luna is offline
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 07-18-2018 , 18:07   Re: Entity only takedamage from knife
Reply With Quote #17

Quote:
Originally Posted by Celena Luna View Post
It is really simple.
Nothing special so far.
Testing ur code, i got that error.
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM
Ghosted is offline
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 07-18-2018 , 18:11   Re: Entity only takedamage from knife
Reply With Quote #18

Done. Error presents in Play_Animation. Line 176

EDIT:

I think model is bad.

EDIT 2:
Time to sleep!
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM

Last edited by Ghosted; 07-18-2018 at 18:13.
Ghosted is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 07-18-2018 , 18:12   Re: Entity only takedamage from knife
Reply With Quote #19

ehhhhhh.... I really don't know where the bug is...

Edit:
Yeah. Time to sleep....

Edit2:
If it bad, how can you make it work?

Edit3:
I don't know how they do it but there is no hit box on that Appear animation. Just wow.
__________________
My plugin:

Last edited by Celena Luna; 07-18-2018 at 18:32.
Celena Luna 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 12:59.


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