Raised This Month: $ Target: $400
 0% 

Get the classname with FM_CreateEntity


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Ramono
Veteran Member
Join Date: Nov 2005
Location: Netherlands
Old 07-02-2007 , 07:21   Get the classname with FM_CreateEntity
Reply With Quote #1

Code:
#include <amxmodx> #include <fakemeta> #define PLUGIN "ENTTEST" #define VERSION "1.0" #define AUTHOR "NL)Ramon(NL" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_forward(FM_CreateEntity, "CreateEntity",1) } public CreateEntity() {     new ent = get_orig_retval()     server_print("ent = %d",ent)     new classname[32]     pev(ent,pev_classname,classname,31) //<-- Error Line     server_print("Classname = %s",classname) }

For some reason this gives a error that the entity doesnt exists.
ent doesnt contain 0, looks like a normal entity number to me.
Can anyone help me out?

Thanks,
Ramon
__________________
Um, hi.
Ramono is offline
 



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 20:52.


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