Can I create new entity with property in Game Engine using AMXX
2 Attachment(s)
Hello :)
So, I try create new entities to use that in maps (mapping), entity when triggered print message in chat ! But it's not work, when connected server,when triggered it Create entity in the information's classname : game_cprinter keyValue : targetname : Name message : Message spawnflags: 1:All Players 2:Remove On fire PHP Code:
Code:
L 08/10/2020 - 07:56:51: [HAMSANDWICH] Failed to retrieve classtype for "game_cprinter", hook for "CGameChatPrinter" not active. |
Re: Problem with hamsandwich ham_use !
I assume that your entity class is a button, so you need to register your ham func as a post function, because the message is triggered AFTER you pressed that button.
btw, I see you tried to make it with reAPI, so, you can try also engine's register_think(): register_think(const Classname[], const function[]); |
Re: Problem with hamsandwich ham_use !
Quote:
trigger_multiple or trigger_relay or func_door, the important when entity triggered from another entity :) |
Re: Problem with hamsandwich ham_use !
Quote:
PHP Code:
|
Re: Problem with hamsandwich ham_use !
PHP Code:
and btw Message should be string not an integer. |
Re: Problem with hamsandwich ham_use !
Quote:
|
Re: Problem with hamsandwich ham_use !
Like in client side :
PHP Code:
|
Re: i can't create new entity game_cprinter
You can't create a new entity out of thin air. It needs to be defined in the game code first. You can try creating a module and using LINK_ENTITY_TO_CLASS to create a new entity type.
|
Re: i can't create new entity game_cprinter
Quote:
i'm understand :) |
| All times are GMT -4. The time now is 13:51. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.