#include <amxmodx>
#include <fakemeta_util>
new WaterEntity;
new const BSP_RESOURCES[][] =
{
"maps/wall_ladder2.bsp",
"maps/water2.bsp",
"maps/wall_new8.bsp",
"maps/wall_new4.bsp",
"maps/wall_new6.bsp",
"maps/wall_ladder1.bsp",
};
public plugin_precache()
{
register_plugin("water_room_dd2", "1.0.0", "wellasgood");
new Float:Origin[3];
precache_model(BSP_RESOURCES[1]);
WaterEntity = fm_create_entity("func_water");
fm_set_kvd(WaterEntity,"classname","func_water")
fm_set_kvd(WaterEntity,"rendermode","2")
fm_set_kvd(WaterEntity,"renderamt","130")
fm_set_kvd(WaterEntity,"skin","-3")
fm_set_kvd(WaterEntity,"WaveHeight","5")
fm_entity_set_model(WaterEntity, BSP_RESOURCES[1]);
fm_entity_set_origin(WaterEntity, Origin);
fm_DispatchSpawn(WaterEntity);
fm_drop_to_floor(WaterEntity);
precache_model(BSP_RESOURCES[0]);
new GlassEntities = fm_create_entity("func_ladder");
fm_set_kvd(GlassEntities,"classname","func_ladder");
fm_entity_set_model(GlassEntities, BSP_RESOURCES[0]);
fm_entity_set_origin(GlassEntities, Origin);
fm_DispatchSpawn(GlassEntities);
fm_drop_to_floor(GlassEntities);
precache_model(BSP_RESOURCES[5]);
new GlassEntities4 = fm_create_entity("func_wall");
fm_set_kvd(GlassEntities4,"classname","func_wall");
fm_set_kvd(GlassEntities4,"rendermode","4");
fm_set_kvd(GlassEntities4,"renderamt","255");
fm_entity_set_model(GlassEntities4, BSP_RESOURCES[5]);
fm_entity_set_origin(GlassEntities4, Origin);
fm_DispatchSpawn(GlassEntities4);
fm_drop_to_floor(GlassEntities4);
precache_model(BSP_RESOURCES[2]);
new GlassEntities1 = fm_create_entity("func_breakable");
fm_set_kvd(GlassEntities1,"classname","func_breakable");
fm_set_kvd(GlassEntities1,"strenght","15");
fm_set_kvd(GlassEntities1,"rendermode","2");
fm_set_kvd(GlassEntities1,"renderamt","100");
fm_entity_set_model(GlassEntities1, BSP_RESOURCES[2]);
fm_entity_set_origin(GlassEntities1, Origin);
fm_DispatchSpawn(GlassEntities1);
fm_drop_to_floor(GlassEntities1);
precache_model(BSP_RESOURCES[3]);
new GlassEntities2 = fm_create_entity("func_wall");
fm_set_kvd(GlassEntities2,"classname","func_wall");
fm_set_kvd(GlassEntities2,"rendermode","2");
fm_set_kvd(GlassEntities2,"renderamt","100");
fm_entity_set_model(GlassEntities2, BSP_RESOURCES[3]);
fm_entity_set_origin(GlassEntities2, Origin);
fm_DispatchSpawn(GlassEntities2);
fm_drop_to_floor(GlassEntities2);
precache_model(BSP_RESOURCES[4]);
new GlassEntities3 = fm_create_entity("func_wall");
fm_set_kvd(GlassEntities3,"classname","func_wall");
fm_set_kvd(GlassEntities3,"rendermode","2");
fm_set_kvd(GlassEntities3,"renderamt","100");
fm_entity_set_model(GlassEntities3, BSP_RESOURCES[4]);
fm_entity_set_origin(GlassEntities3, Origin);
fm_DispatchSpawn(GlassEntities3);
fm_drop_to_floor(GlassEntities3);
}
public plugin_init()
{
register_clcmd("water+", "pWater");
register_clcmd("water-", "mWater");
}
public mWater(id)
{
new Float:origin[3];
pev(WaterEntity, pev_origin, origin);
origin[2] -= 15.0;
set_pev(WaterEntity, pev_origin, origin);
}
public pWater(id)
{
new Float:origin[3];
pev(WaterEntity, pev_origin, origin);
origin[2] += 15.0;
set_pev(WaterEntity, pev_origin, origin);
}