Is it possible to create planting point via Amxx? I tryed this:
PHP Code:
#include <amxmodx>
#include <fakemeta>
#define fm_create_entity(%1) engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, %1))
public plugin_precache()
{
new iEnt = fm_create_entity("func_bomb_target")
SetKeyValue(iEnt, "model", "*1", "func_bomb_target")
SetKeyValue(iEnt, "origin","145 -418 53", "func_bomb_target")
dllfunc(DLLFunc_Spawn, iEnt)
}
SetKeyValue(iEnt, const szKey[], const szValue[], const szClassName[])
{
set_kvd(0, KV_ClassName, szClassName)
set_kvd(0, KV_KeyName, szKey)
set_kvd(0, KV_Value, szValue)
set_kvd(0, KV_fHandled, 0)
dllfunc(DLLFunc_KeyValue, iEnt, 0)
}
/*
"origin" "145 -418 53"
"model" "*1"
"classname" "func_bomb_target"
*/
but it doesn't work.. Any suggestions?