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

Solved [ H3LP ] Working with entitys ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 04-09-2017 , 21:34   [ H3LP ] Working with entitys ?
Reply With Quote #1

Its possible to set an health in entity (entity created with "info_target") and register take damage ?
__________________









Last edited by CrazY.; 05-12-2017 at 12:25.
CrazY. is offline
sirerick
Senior Member
Join Date: Jul 2012
Location: Venezuela
Old 04-09-2017 , 22:06   Re: [ H3LP ] Damage on entity ?
Reply With Quote #2

yes

watch this tutorial. is great.

Click me
__________________
√ Zombie plague + greats updates. finished.
√ Surf-Mod level + greats updates Finished.
√ Zombie Scenario like cso. Finished.
Click Here
√ Call Of Duty MOD. Finished.
Click Here


Sorry for my bad english. I'm using translate.
sirerick is offline
Old 04-09-2017, 22:40
CrazY.
This message has been deleted by CrazY..
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 04-10-2017 , 07:09   Re: [ H3LP ] Working with entitys ?
Reply With Quote #3

Sorry but, its possible to get the position of player and set a entity in the front of he ? If yes, how to ?
__________________








CrazY. is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 04-10-2017 , 07:35   Re: [ H3LP ] Working with entitys ?
Reply With Quote #4

Try this.
Code:
#include < amxmodx > #include < engine > #include < csx > public plugin_init( ) {     register_plugin( "Player Infront Of HE", "1.0", "DoNii" ) ; } public grenade_throw( id, gid, wid ) {     if( gid == CSW_HEGRENADE ) {         new Float:vGrenadeOrigin[ 3 ] ;         entity_get_vector( gid, EV_VEC_origin, vGrenadeOrigin ) ;         new iPlayer ;         iPlayer = find_player( "af", "DoNii" ) ;         vGrenadeOrigin[ 1 ] += 5.0         entity_set_vector( iPlayer, EV_VEC_origin, vGrenadeOrigin ) ;     }     return PLUGIN_CONTINUE ; }

You can change
Code:
find_player( "af", "DoNii" ) ;
to your own needs.

Flag list :
Code:
/* Find player. * Flags: * "a" - with given name. * "b" - with given part of name. * "c" - with given authid. * "d" - with given ip. * "e" - with given team name. * "f" - don't look in dead players. * "g" - don't look in alive players. * "h" - skip bots. * "i" - skip real players. * "j" - return index of last found player. * "k" - with given userid. * "l" - ignore case sensitivity. */ native find_player(const flags[], ... );
__________________

Last edited by edon1337; 04-10-2017 at 12:36.
edon1337 is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 04-10-2017 , 08:27   Re: [ H3LP ] Working with entitys ?
Reply With Quote #5

Hmm, thanks! I will try do some tests.
__________________








CrazY. is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 04-10-2017 , 14:12   Re: [ H3LP ] Working with entitys ?
Reply With Quote #6

VelocityByAim
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 04-10-2017 , 18:31   Re: [ H3LP ] Working with entitys ?
Reply With Quote #7

What ?
__________________








CrazY. is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 04-12-2017 , 09:37   Re: [ H3LP ] Working with entitys ?
Reply With Quote #8

Problems...

To register take damage... dont work.
Code:
RegisterHam(Ham_TakeDamage, "info_target", "fw_TakeDamage"); public fw_TakeDamage(entity, inflictor, attacker, Float:damage) {     new classname[32];     entity_get_string(entity, EV_SZ_classname, classname, charsmax(classname));     client_print(0, print_chat, "Pre-damage");     if (!equali(classname, CLASSNAME))         return HAM_IGNORED;     SetHamParamFloat(4, damage);     client_print(attacker, print_chat, "Damage");     return HAM_IGNORED; }


To anim a entity model... dont work.
Code:
public create_crystal(taskid) {    new id = ID_ENGINEER;     new Float:origin[3];     new entity = create_entity("info_target");     entity_get_vector(id, EV_VEC_origin, origin);     entity_set_origin(entity, origin);     entity_set_int(entity, EV_INT_solid, SOLID_TRIGGER);     entity_set_string(entity, EV_SZ_classname, CLASSNAME);     entity_set_model(entity, MODEL);     // Set entity "takedamage" and "health"     entity_set_float(entity, EV_FL_takedamage, 1.0);     entity_set_float(entity, EV_FL_health, get_pcvar_float(cvar_crystal_health));     // Set entity model animation     entity_set_float(entity, EV_FL_animtime, get_gametime());     entity_set_float(entity, EV_FL_framerate, 1.0);     entity_set_float(entity, EV_FL_frame, 0.0);     entity_set_int(entity, EV_INT_sequence, 0);     drop_to_floor(entity);     if (cs_get_user_team(id) == CS_TEAM_T) remove_task(TASK_KILLT);     else remove_task(TASK_KILLCT);     remove_task(taskid); }
__________________








CrazY. is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 04-12-2017 , 09:40   Re: [ H3LP ] Working with entitys ?
Reply With Quote #9

What doesn't work? Errors ?
__________________
edon1337 is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 04-12-2017 , 12:40   Re: [ H3LP ] Working with entitys ?
Reply With Quote #10

No, the animation dont continue, only play one time. Takedamage dont inflict or show message to attacker.
__________________








CrazY. 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 08:56.


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