[TFC] Creating detpack entity
I am running a server with the medicmod plugin by hlstriker, in tfc there are walls and other things that can be 'destroyed' with detpacks to open new pathways, with medicmod, you cannot set detpacks as detpacks are for a certain class only, anyways I am trying to make a simple plugin that will create an entity when a user says in chat "!detpack" without the quotes..
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx> #include <engine>
#define PLUGIN "Detpacker" #define VERSION "1.0" #define AUTHOR "Master"
public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd("say !detpack","set_detpack",-1,"Sets a detpack where you are standing")
}
public set_detpack(id) { new entid = create_entity("detpack") new Float:origin[3] get_user_origin(id, origin, 0) entity_set_model(entid, "models/detpack.mdl") entity_set_origin(entid, Float:origin) entity_set_int(entid, EV_INT_solid, 1) // what am I missing? client_print(id,print_chat,"[AMXX] Laying detpack at ^"%d^"",origin) return PLUGIN_HANDLED }
public plugin_precache() { precache_model("models/detpack.mdl") //since this is used by demoman, you would expect it to be precached // but its better to be safe than sorry :x }
it apparently makes a detpack, but I guess it doesnt 'exist' because whe I try setting a detpack it says I cant stack detpacks..
|