| GhostMan |
12-18-2013 10:24 |
snowing
Author doesn't help in official thread so i'm creating new one.
Problem is that it's snowing through glass. How to stop that? I want that it would snow only when there is no other textures above, just sky.
PHP Code:
#include <amxmodx>
#include <fakemeta>
#define PLUGIN "Winter Environment"
#define VERSION "2.0"
#define AUTHOR "Alka"
new g_iLedSprite;
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR);
register_message(SVC_TEMPENTITY, "message_TempEntity");
}
public plugin_precache()
{
engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "env_snow"));
g_iLedSprite = precache_model("sprites/ledglow.spr");
}
public message_TempEntity(msg_id, msg_dest, msg_ent)
{
if(get_msg_arg_int(1) == TE_GLOWSPRITE)
{
if(get_msg_arg_int(5) == g_iLedSprite)
return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;
}
|