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:
/*
Classname : game_cprinter
Role : Print Message in chat !
KeyValue :
targetname : Name
message : Message
Spawn Flags :
1: All Players
2: Remove On fire
*/
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>
// #include <reapi>
public plugin_init()
{
// Load Plugin
register_plugin("[Entity] Game Chat Printer", "1.0", "LiZou Mapper")
// Ham
RegisterHam(Ham_Use, "game_cprinter", "CGameChatPrinter")
}
public CGameChatPrinter(const Entity, const Activator)
{
new Message/*, Spawnflags*/
// Get message from entity
// get_entvar(Entity, var_message, Message)
// get_entvar(Entity, var_spawnflags, Spawnflags)
pev(Entity, pev_message, Message)
// Print message for all players !
client_print_color(0, print_chat, "%s", Message)
}
/*
stock mapper_remove_entity(const Entity)
{
// Remove entity from map !
engfunc(EngFunc_RemoveEntity, Entity)
}
*/
but when connected server, i see it in console !
Code:
L 08/10/2020 - 07:56:51: [HAMSANDWICH] Failed to retrieve classtype for "game_cprinter", hook for "CGameChatPrinter" not active.
L 08/10/2020 - 07:56:51: [AMXX] Run time error 10 (plugin "entity_game_cprinter.amxx") (native "RegisterHam") - debug not enabled!
L 08/10/2020 - 07:56:51: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quote
You can see photo's