AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Entity. (https://forums.alliedmods.net/showthread.php?t=183066)

DelFast 04-16-2012 16:31

Entity.
 
Why entity dont create?

PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fakemeta>

#define PLUGIN "xxx"
#define VERSION "1.0"
#define AUTHOR "DelFast"

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_touch("*","some_entiti","function")
}

public function() {
    new 
ent engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"info_target"))
    
set_pev(ent,pev_classname,"some_entity")
    
set_pev(ent,pev_origin,{3100.51074.4, -2317.2}) // set your origins here
    
engfunc(EngFunc_SetSizeentFloat:{-52.0, -52.0, -32.0}, Float:{52.052.032.0})
    
dllfunc(DLLFunc_Spawnent)
    
set_pev(entpev_solidSOLID_BBOX)

    return 
ent



Exolent[jNr] 04-16-2012 16:55

Re: Entity.
 
What are you trying to do?

DelFast 04-16-2012 16:56

Re: Entity.
 
Create invisible solid box an origins, but he's dont create.

Exolent[jNr] 04-16-2012 16:58

Re: Entity.
 
Quote:

Originally Posted by DelFast (Post 1690659)
Create invisible solid box an origins, but he's dont create.

No no no. I know you are trying to create an entity. But when? Your touch hook makes no sense.

DelFast 04-16-2012 16:59

Re: Entity.
 
As will be right?

GordonFreeman (RU) 04-17-2012 03:39

Re: Entity.
 
Exolent, why?

DelFast 04-17-2012 07:07

Re: Entity.
 
My code is dont work.. Exolent, why touch hook makes no sense?

Exolent[jNr] 04-17-2012 09:32

Re: Entity.
 
You don't need to spawn the entity. You just need to give it a model.

DelFast 04-17-2012 11:06

Re: Entity.
 
Quote:

Originally Posted by Exolent[jNr] (Post 1690976)
You don't need to spawn the entity. You just need to give it a model.

Okey, i delete "return", but i want create an invisible entity!

Exolent[jNr] 04-17-2012 11:12

Re: Entity.
 
... I said nothing about a return. Did you even read?


All times are GMT -4. The time now is 19:53.

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