Raised This Month: $ Target: $400
 0% 

Solved Can I create new entity with property in Game Engine using AMXX


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
LiZou Mapper
Member
Join Date: Oct 2018
Location: The Red City !
Old 08-10-2020 , 04:21   Can I create new entity with property in Game Engine using AMXX
Reply With Quote #1

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(Entitypev_messageMessage)

    
// Print message for all players ! 
    
client_print_color(0print_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
Attached Images
File Type: jpg lizou2.jpg (59.6 KB, 89 views)
File Type: jpg lizou.jpg (97.2 KB, 101 views)
__________________

-------------
My Maps !
Zombie Escape Mod !
-------------


Last edited by LiZou Mapper; 06-21-2022 at 21:53. Reason: change little something
LiZou Mapper is offline
 


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 13:51.


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