Code:
#include <amxmodx>
#include <engine>
#include <fakemeta>
public plugin_precache()
{
precache_model("models/sky.mdl")
}
public plugin_init()
{
register_plugin("Apokalyptic sky","1.0","")
register_clcmd("say /sky","dark_sky")
}
public dark_sky(id)
{
new g_SkyEnt = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"))
if (pev_valid(g_SkyEnt))
{
set_pev(g_SkyEnt, pev_solid, SOLID_NOT)
new Float:origin[3]
pev(id, pev_origin, origin)
entity_set_origin(g_SkyEnt,origin)
entity_set_float(g_SkyEnt,EV_FL_animtime,2.0)
entity_set_float(g_SkyEnt,EV_FL_framerate,1.0)
entity_set_int(g_SkyEnt,EV_INT_sequence,0)
entity_set_model(g_SkyEnt,"models/sky.mdl")
dllfunc(DLLFunc_Spawn, g_SkyEnt)
}
}