New code.. also dont work.
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fakemeta>
#define PLUGIN "xxx"
#define VERSION "1.0"
#define AUTHOR "DelFast"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_forward(FM_Touch, "fw_touch")
}
public plugin_precache()
precache_model("models/gib_skull.mdl")
public fw_touch(zone, player) {
if (!pev_valid(zone) || !is_user_connected(player))
return FMRES_IGNORED
static classname[33]
pev(player, pev_classname, classname, 32)
if (!equal(classname, "player"))
return FMRES_IGNORED
pev(zone, pev_classname, classname, 32)
return FMRES_IGNORED
}
public CreateZone() {
new Float:origins[3] = {3072.0, 1050.0, -2317.0}
new entity = fm_create_entity("info_target")
set_pev(entity, pev_classname, "myzone")
fm_entity_set_model(entity, "models/gib_skull.mdl")
fm_entity_set_origin(entity,origins)
set_pev(entity, pev_movetype, MOVETYPE_FLY)
set_pev(entity, pev_solid, SOLID_BBOX)
fm_entity_set_size(entity, Float:{-52.0, -52.0, -32.0}, Float:{52.0, 52.0, 32.0})
fm_set_entity_visibility(entity, 0)
return entity
}
stock fm_entity_set_origin(index, const Float:origin[3]) {
new Float:mins[3], Float:maxs[3]
pev(index, pev_mins, mins)
pev(index, pev_maxs, maxs)
engfunc(EngFunc_SetSize, index, mins, maxs)
return engfunc(EngFunc_SetOrigin, index, origin)
}
stock fm_set_entity_visibility(index, visible = 1) {
set_pev(index, pev_effects, visible == 1 ? pev(index, pev_effects) & ~EF_NODRAW : pev(index, pev_effects) | EF_NODRAW)
return 1
}
stock fm_entity_set_size(index, const Float:mins[3], const Float:maxs[3])
return engfunc(EngFunc_SetSize, index, mins, maxs)
stock fm_entity_set_model(index, const model[])
return engfunc(EngFunc_SetModel, index, model)
stock fm_create_entity(const classname[])
return engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, classname))