Raised This Month: $ Target: $400
 0% 

Problem with entity


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
didoWEE
Senior Member
Join Date: Oct 2012
Location: Bulgaria
Old 05-04-2013 , 17:31   Problem with entity
Reply With Quote #1

Hi all.
I'm trying to make an entity to follow me. But the entity doesn't appears.
Here's the code:
PHP Code:
#include <amxmodx>
#include <engine>
#include <hamsandwich>

new szMdl[] = "models/TEST.mdl";

public 
plugin_init() register_clcmd("say /test""Func");
public 
plugin_precache() precache_model(szMdl);

public 
Func(id)
{
    new 
ent create_entity("info_target");
    
ExecuteHam(Ham_CS_RoundRespawnent);
    
    
entity_set_string(entEV_SZ_classname"classname");
    
    new 
Float:fVecOrigin[3];
    
entity_get_vector(idEV_VEC_originfVecOrigin);
    
entity_set_vector(entEV_VEC_originfVecOrigin);
    
// entity_set_origin(ent, fVecOrigin);
    
    
entity_set_float(entEV_FL_takedamage25.0); // Also can someone tell me what is this for
    // I saw it in the NPC tutorial but I don't know what is it for
    
entity_set_float(entEV_FL_health250.0);
    
    
entity_set_size(entFloat:{0.00.00.0}, Float:{50.050.050.0});
    
entity_set_int(entEV_INT_solidSOLID_NOT);
    
entity_set_model(entszMdl);

    
entity_set_int(entEV_INT_movetypeMOVETYPE_FOLLOW);
    
entity_set_edict(entEV_ENT_aimentid);
    
    
entity_set_int(entEV_INT_renderfxkRenderFxGlowShell);
    
entity_set_int(entEV_INT_rendermodekRenderTransAlpha);
    
entity_set_float(entEV_FL_renderamt50.0);
    
entity_set_vector(entEV_VEC_rendercolorFloat:{0.0200.010.0});
    
    
entity_set_float(entEV_FL_animtime2.0)
    
entity_set_float(entEV_FL_framerate1.0)
    
entity_set_int(entEV_INT_sequence0);

didoWEE is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-04-2013 , 18:37   Re: Problem with entity
Reply With Quote #2

ExecuteHam(Ham_CS_RoundRespawn, ent)

->

DispatchSpawn( ent )
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
didoWEE
Senior Member
Join Date: Oct 2012
Location: Bulgaria
Old 05-05-2013 , 05:49   Re: Problem with entity
Reply With Quote #3

Again, didn't work. I mean, it doesn't appears.

Btw, did you see my comments? Can you tell me what is take_damage for because I don't want to make new tread?

Last edited by didoWEE; 05-05-2013 at 05:54.
didoWEE is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 05-05-2013 , 07:29   Re: Problem with entity
Reply With Quote #4

Change kRenderTransAlpha to kRenderTransTexture.
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 05-05-2013 , 07:38   Re: Problem with entity
Reply With Quote #5

First, if you add entity_set_edict(ent, EV_ENT_aiment, id) to entity then that id will not see that ent
( Also owner was needed to set if you want to use aiment if i remember correctly )

2. if you use aiment then you cant change render stuff (EV_INT_rendermode, EV_INT_renderfx etc...)
if you do then entity will be invisible for ohter but you can see it with CAMERA_3RDPERSON view mode.
.Dare Devil. is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 05-05-2013 , 08:10   Re: Problem with entity
Reply With Quote #6

Quote:
Originally Posted by hornet View Post
Change kRenderTransAlpha to kRenderTransTexture.
Oh wait seems that it won't work with any render mode that allow alpha change.
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
didoWEE
Senior Member
Join Date: Oct 2012
Location: Bulgaria
Old 05-05-2013 , 08:38   Re: Problem with entity
Reply With Quote #7

I'm trying to make entity which moves with me and looks like ZP: Force Field. But it doesn't appears. I can't see problem to see entities with entity_set_edict(ent, EV_ENT_aiment, id);

Last edited by didoWEE; 05-05-2013 at 08:39.
didoWEE is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 05-05-2013 , 08:43   Re: Problem with entity
Reply With Quote #8

Quote:
Originally Posted by didoWEE View Post
I can't see problem to see entities with entity_set_edict(ent, EV_ENT_aiment, id);
Try to make more sense.
I haven't played zombie plague in a long time so I'm not sure what you mean. Can't you just set glow on the player or is it supposed to appear as a glowing sphere?
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
didoWEE
Senior Member
Join Date: Oct 2012
Location: Bulgaria
Old 05-05-2013 , 08:50   Re: Problem with entity
Reply With Quote #9

I want http://www.prikachi.com/users/volinouse/7T.png to move with me everywhere
didoWEE is offline
Reply


Thread Tools
Display Modes

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 10:50.


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