Raised This Month: $ Target: $400
 0% 

Solved [ H3LP ] Bind on head?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 04-03-2017 , 19:14   [ H3LP ] Bind on head?
Reply With Quote #1

Hey AlliedModders, I dont find any thing about this, then... Its possible to "bind" the player into the head of the victim when the player jump? Example: player jump, if he touch the head, after X seconds use DDL_Kill of fakemeta to kill the victim, and the player continue in the X/Y position in the head of the victim.

Well, I know that is hard but dont impossible.. Have much good programmers, any help are welcome.
__________________









Last edited by CrazY.; 04-21-2017 at 22:32.
CrazY. is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-03-2017 , 21:47   Re: [ H3LP ] Bind on head?
Reply With Quote #2

What??? That makes no sense. You'll need to explain in much more detail to make any sense of that.
__________________
fysiks is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 04-03-2017 , 22:44   Re: [ H3LP ] Bind on head?
Reply With Quote #3

Quote:
Originally Posted by fysiks View Post
What??? That makes no sense. You'll need to explain in much more detail to make any sense of that.
http://youtube.com/watch?v=ROb1IPEUC-k (facehugger attack)
__________________








CrazY. is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 04-04-2017 , 06:14   Re: [ H3LP ] Bind on head?
Reply With Quote #4

Ok.. I think that is hard to do.. Any way to do a thing style the attack of facehugger from halflife ? (The AI Jump into the Gordon, and inflict damage).
__________________








CrazY. is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 04-04-2017 , 10:24   Re: [ H3LP ] Bind on head?
Reply With Quote #5

Mhmm.. Well, i got an idea..

Create an invisible entity for each player, using prethink make it stick to the player's head, then register touch to detect if any other player touched that player's head entity, and if so, make the player who touched that entity stick to it's victims head by using prethink, then set a timer and execute ham kill

Use a two dimensional boolean arrays in order to transmit the required data from touch to prethink ( g_TouchedHead[33][33], where in the first cell you will store the attacker's index and in the second one the victim's index )
__________________
Depresie is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 04-04-2017 , 10:30   Re: [ H3LP ] Bind on head?
Reply With Quote #6

Hmm.. well, thanks for the idea Depresie, I will try do some tests.
__________________








CrazY. is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 04-04-2017 , 10:32   Re: [ H3LP ] Bind on head?
Reply With Quote #7

It may be a pain in the ass for you to get this done, but i don't have time to do it myself right now..

Just try to do it yourself, and feel free to post here the code and ask questions
__________________
Depresie is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 04-04-2017 , 10:40   Re: [ H3LP ] Bind on head?
Reply With Quote #8

No problem bro, you already gived to me the code, but in format of logic. I have one doubt, when I create a entity I think its possible change the origin, but how to?
__________________









Last edited by CrazY.; 04-04-2017 at 10:41.
CrazY. is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 04-04-2017 , 12:48   Re: [ H3LP ] Bind on head?
Reply With Quote #9

You change it's origin using either engine natives ( engfunc ) or fakemeta native set_pev(ent, pev_origin) etc
__________________
Depresie is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 04-04-2017 , 18:28   Re: [ H3LP ] Bind on head?
Reply With Quote #10

Ok Depresie, I do a code but have one bugs. I dont know much work with entitys, but lets go.

Code:
#include <amxmodx> #include <engine> #include <fakemeta> #include <hamsandwich> #include <cs_ham_bots_api> new const ENTITY_MODEL[] = "models/bag.mdl"; public plugin_init() {     register_plugin("Plugin", "Version", "Author");     RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawn_Post", 1);     RegisterHamBots(Ham_Spawn, "fw_PlayerSpawn_Post", 1);     register_forward(FM_Touch, "forward_touch"); } public plugin_precache() {     precache_model(ENTITY_MODEL); } public fw_PlayerSpawn_Post(id) {     if (!is_user_alive(id))         return;     new entity, Float:origin[3];     entity = create_entity("info_target");     entity_get_vector(id, EV_VEC_origin, origin);     set_pev(entity, pev_body, 1);     entity_set_model(entity, ENTITY_MODEL);     origin[2] += 10;     entity_set_origin(entity, origin);     set_pev(entity, pev_owner, id);     entity_set_string(entity, EV_SZ_classname, "entity_head");     entity_set_int(entity, EV_INT_solid, 2); } public forward_touch(toucher, touched) {     if (is_user_alive(toucher))     {         client_print(toucher, print_chat, "Touch");         dllfunc(DLLFunc_ClientKill, toucher);     } }

Now the problems of this code. First, obviously that code is killing the toucher and dont the owner of the entity. Second, I think if exists other entity in the game and a player touch he, I think will execute the "entity_head" class. You can help me to fix that? And, any optimization?

Sorry for my English.
__________________








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 17:48.


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