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
__________________