PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fakemeta>
#include <hamsandwich>
/*
Fake Lampa
Improven the Light on the dark map
Aditional Credit: ConnorMcLeod
*/
//#define WR_HAM
//#define WG_SUPPORT
#pragma semicolon 1
#if defined WG_SUPPORT
#define VERSION "2.6 b1 WG"
#else
#define VERSION "2.6 b1"
#endif
#define AccessFlag ADMIN_KICK
static const FKLMODEL[] = { "models/fk8888.mdl" };
static const FKLCLASS[] = { "fake_lampa" };
static const METAL[] = { "models/chromegibs.mdl" };
#if defined WG_SUPPORT
static const RIC[] = { "debris/metal6.wav" };
static const SPR[] = { "sprites/dot.spr" };
#endif
/*==========================================================================/*================================================================================
Customization ends here! Yes, that's it. Editing anything beyond
here is not officially supported. Proceed at your own risk... !!!
=================================================================================*/
new g_msgSayText, g_FKMlin, g_FKlen, g_FKet[33] = 0;
new DIR_CONFIGS[64], MAP_NAME[32], CLASS_NAME[18];
new lampa_properites[5]; // 0=Radius 1=Red 2=Green 3=Blue 4=MaxLampa
new fknummax;
new fkdamage;
new spr_flmetal;
#if defined WG_SUPPORT
new Float:grab_totaldis[33], grab[33], spr_flbeam;
#endif
public plugin_init()
{
// New plugin
register_plugin("Fake Lamap Entity", VERSION, "Night Dreamer");
// Game-Monitor support
register_cvar("FLE_VERSION", VERSION, FCVAR_SERVER|FCVAR_SPONLY);
set_cvar_string("FLE_VERSION", VERSION);
register_clcmd("FKADD", "CFLE", AccessFlag,"Add Fake Lampa");
register_clcmd("FKDEL", "RFLE", AccessFlag,"Remove Fake Lampa");
register_clcmd("FKSAVE", "SFLE", AccessFlag,"Save Fake Lampa");
register_clcmd("FKREMOVEALL", "RAFLE", AccessFlag,"Remove All Fake Lampa");
register_clcmd("say /FKMENU","FKOPEN_MENU", AccessFlag,"Open Fake Lampa Menu");
register_clcmd("say_team /FKMENU","FKOPEN_MENU", AccessFlag,"Open Fake Lampa Menu");
register_clcmd("FKMENU","FKOPEN_MENU", AccessFlag,"Open Fake Lampa Menu");
#if defined WG_SUPPORT
register_clcmd("+grab_fk","grab_on", AccessFlag," - Use: bind key +grab_fk to grab a Fake Lamap Ent");
register_clcmd("-grab_fk","grab_off");
#endif
RegisterHam(Ham_TraceAttack, "world_items", "lampa_damage");
RegisterHam(Ham_Killed, "world_items", "lampa_break", 1);
#if defined WR_HAM
RegisterHam(Ham_Think, "world_items", "lampa_think");
RegisterHam(Ham_Touch, "world_items", "lampa_touch");
#else
register_think(FKLCLASS, "lampa_think");
register_touch(FKLCLASS, "*", "lampa_touch");
#endif
/*if(get_pcvar_num(fkdamage) == 2)
register_event("HLTV", "plugin_cfg", "a", "1=0", "2=0")*/
g_FKlen = menu_create("\rFake Lampa Menu","FKMENU_HANDLER");
menu_additem(g_FKlen,"\wFake Lampa \rAdd !","1",AccessFlag);
menu_additem(g_FKlen,"\wFake Lampa \rRemove !","2",AccessFlag);
menu_additem(g_FKlen,"\wFake Lampa \rSave !","3",AccessFlag);
menu_additem(g_FKlen,"\wFake Lampa \rRemoveAll !","4",AccessFlag);
menu_setprop(g_FKlen,MPROP_EXIT,MEXIT_ALL);
g_msgSayText = get_user_msgid("SayText");
fknummax = register_cvar("fake_lampa_max","5");
fkdamage = register_cvar("fake_lampa_dmg","1");
lampa_properites[0] = register_cvar("FK_RADIUS", "20");
lampa_properites[1] = register_cvar("FK_COLOR_R", "102");
lampa_properites[2] = register_cvar("FK_COLOR_G", "89");
lampa_properites[3] = register_cvar("FK_COLOR_B", "87");
}
public plugin_precache()
{
g_FKMlin = precache_model(FKLMODEL);
spr_flmetal = precache_model(METAL);
#if defined WG_SUPPORT
spr_flbeam = precache_model(SPR);
precache_sound(RIC);
#endif
}
public plugin_cfg()
{
new filename[64];
formatex(DIR_CONFIGS[get_configsdir(DIR_CONFIGS, charsmax(DIR_CONFIGS))], charsmax(DIR_CONFIGS), "/FLE");
formatex(MAP_NAME[get_mapname(MAP_NAME, charsmax(MAP_NAME))], charsmax(MAP_NAME), "_FLE");
formatex(filename, charsmax(filename), "%s/%s.cfg", DIR_CONFIGS, MAP_NAME);
if(!file_exists(filename))
return PLUGIN_CONTINUE;
new FileOrigin[3][32], FileAngles[3][32], Line, Length, Buffer[256];
new Temp1[128], Temp2[128];
new Float:fAimOrigin[3], Float:fAngles[3];
new szRadius[4], szRed[4], szGreen[4], szBlue[4];
new iRadius, iRed, iGreen, iBlue;
new pcvarmax = get_pcvar_num(fknummax);
if(lampa_properites[4] >= pcvarmax)
return PLUGIN_CONTINUE;
while(read_file(filename, Line++, Buffer, charsmax(Buffer), Length))
{
if((Buffer[0]==';')|| !Length)
continue;
strtok(Buffer, Temp1, charsmax(Temp1), Temp2, charsmax(Temp2), '|', 0);
parse(Temp1,
FileOrigin[0], charsmax(FileOrigin[]),
FileOrigin[1], charsmax(FileOrigin[]),
FileOrigin[2], charsmax(FileOrigin[]),
FileAngles[0], charsmax(FileAngles[]),
FileAngles[1], charsmax(FileAngles[]),
FileAngles[2], charsmax(FileAngles[]));
fAimOrigin[0] = str_to_float(FileOrigin[0]);
fAimOrigin[1] = str_to_float(FileOrigin[1]);
fAimOrigin[2] = str_to_float(FileOrigin[2]);
fAngles[0] = str_to_float(FileAngles[0]);
fAngles[1] = str_to_float(FileAngles[1]);
fAngles[2] = str_to_float(FileAngles[2]);
parse(Temp2,
szRadius, charsmax(szRadius),
szRed, charsmax(szRed),
szGreen, charsmax(szGreen),
szBlue, charsmax(szBlue));
iRadius = str_to_num(szRadius);
iRed = str_to_num(szRed);
iGreen = str_to_num(szGreen);
iBlue = str_to_num(szBlue);
FakeLampaEntity
(
.AimOrigin = fAimOrigin,
.Angles = fAngles,
.Radius = iRadius,
.Red = iRed,
.Green = iGreen,
.Blue = iBlue
);
lampa_properites[4] += 1;
}
return PLUGIN_CONTINUE;
}
public FKOPEN_MENU(id)
{
if(!access(id, AccessFlag))
return;
menu_display(id,g_FKlen,0);
}
public FKMENU_HANDLER(id,menu,item)
{
if(item == MENU_EXIT)
return PLUGIN_HANDLED;
new data[10],iName[64],iAccess,callback;
menu_item_getinfo(menu,item,iAccess,data,9,iName,63,callback);
new key = str_to_num(data);
new Buffer[128];
switch(key)
{
case 1:
{
/* Add Fake Lampa */
CFLE(id);
formatex(Buffer,127,"^x03Fake Lampa Menu^x01 Fake Lampa Added !");
g_FKet[id] = 1;
menu_display(id,g_FKlen,0);
}
case 2:
{
/* Remov Fake Lampa */
RFLE(id);
formatex(Buffer,127,"^x03Fake Lampa Menu^x01 Fake Lampa Remove !");
g_FKet[id] = 2;
menu_display(id,g_FKlen,0);
}
case 3:
{
/* Save Fake Lampa */
SFLE(id);
formatex(Buffer,127,"^x03Fake Lampa Menu^x01 Fake Lampa Saved !");
g_FKet[id] = 3;
menu_display(id,g_FKlen,0);
}
case 4:
{
/* Remove ALL Fake Lampa */
RAFLE(id);
formatex(Buffer,127,"^x03Fake Lampa Menu^x01 Remove ALL Fake Lampa");
g_FKet[id] = 4;
menu_display(id,g_FKlen,0);
}
}
return PLUGIN_HANDLED;
}
public CFLE(id)
{
if(!access(id, AccessFlag))
return;
new Origin[3];
get_user_origin(id, Origin);
new AimOrigin[3];
get_user_origin(id, AimOrigin, 3);
new Float:fAimVec[3];
IVecFVec(AimOrigin, fAimVec);
fAimVec[2] += 10.0;
new vector[3];
vector[0] = AimOrigin[0] - Origin[0];
vector[1] = AimOrigin[1] - Origin[1];
vector[2] = AimOrigin[2] - Origin[2];
new Float:fVector[3];
IVecFVec(vector, fVector);
new Float:fAngles[3];
vector_to_angle(fVector, fAngles);
fAngles[0] -= fAngles[0];
new iRadius = get_pcvar_num(lampa_properites[0]);
new iRed = get_pcvar_num(lampa_properites[1]);
new iGreen = get_pcvar_num(lampa_properites[2]);
new iBlue = get_pcvar_num(lampa_properites[3]);
new Messages[192];
new pcvarmax = get_pcvar_num(fknummax);
if(lampa_properites[4] >= pcvarmax)
{
FKMesaje(id, "^4[FLE]^1Max Fake Lampa Entity has reach");
return;
}
if(point_contents(fAimVec) != (CONTENTS_SOLID | CONTENTS_SKY))
{
FakeLampaEntity
(
.AimOrigin = fAimVec,
.Angles = fAngles,
.Radius = iRadius,
.Red = iRed,
.Green = iGreen,
.Blue = iBlue
);
lampa_properites[4] += 1;
format(Messages, 191, "^4[FLE]^1Fake Lampa Entity's Added. ^4Count: ^1[ %d ]", lampa_properites[4]);
FKMesaje(id, Messages);
}
else
FKMesaje(id, "^4[FLE]^1This location is forbite");
}
public RFLE(id)
{
if(!access(id, AccessFlag))
return;
new ent, iBody, Messages[192];
get_user_aiming(id, ent, iBody);
if(is_valid_ent(id))
{
entity_get_string(ent, EV_SZ_classname, CLASS_NAME, charsmax(CLASS_NAME));
if(!strcmp(CLASS_NAME, FKLCLASS, 1))
{
remove_entity(ent);
lampa_properites[4] -= 1;
format(Messages, 191, "^4[FLE]^1Fake Lampa Entity's DELETE. ^4Remain ^1[ %d ]", lampa_properites[4]);
FKMesaje(id, Messages);
}
else
FKMesaje(id, "^4[FLE]^1Fake Lampa Entity's NOT FOUND!!!");
}
}
public SFLE(id)
{
if(!access(id, AccessFlag))
return;
new filename[64], Buffer[256], Messages[192];
formatex(DIR_CONFIGS[get_configsdir(DIR_CONFIGS, charsmax(DIR_CONFIGS))], charsmax(DIR_CONFIGS), "/FLE");
formatex(MAP_NAME[get_mapname(MAP_NAME, charsmax(MAP_NAME))], charsmax(MAP_NAME), "_FLE");
formatex(filename, charsmax(filename), "%s/%s.cfg", DIR_CONFIGS, MAP_NAME);
if(file_exists(filename))
delete_file(filename);
new Float:fEntOrigin[3], Float:fEntAngles[3];
static ent = -1;
while((ent = find_ent_by_class(ent, FKLCLASS)) != 0)
//while((ent = engfunc(EngFunc_FindEntityByString, ent, "classname", FKLCLASS)))
{
new szRadius[4], szRed[4], szGreen[4], szBlue[4];
entity_get_vector(ent,EV_VEC_origin,fEntOrigin);
entity_get_vector(ent,EV_VEC_angles,fEntAngles);
entity_get_string(ent, EV_SZ_noise, szRadius, 3);
entity_get_string(ent, EV_SZ_noise1, szRed, 3);
entity_get_string(ent, EV_SZ_noise2, szGreen, 3);
entity_get_string(ent, EV_SZ_noise3, szBlue, 3);
new iRadius = str_to_num(szRadius);
new iRed = str_to_num(szRed);
new iGreen = str_to_num(szGreen);
new iBlue = str_to_num(szBlue);
formatex(Buffer, charsmax(Buffer), "%f %f %f %f %f %f | %i %i %i %i",
fEntOrigin[0], fEntOrigin[1], fEntOrigin[2],
fEntAngles[0], fEntAngles[1], fEntAngles[2],
iRadius, iRed, iGreen, iBlue);
write_file(filename, Buffer, -1);
}
format(Messages, 191, "^4[FLE]^1Fake Lampa Entity's SAVED /FLE. ^4Count: ^1[ %d ]", lampa_properites[4]);
FKMesaje(id, Messages);
}
public RAFLE(id)
{
if(!access(id, AccessFlag))
return;
new ent;
ent = -1;
while((ent = find_ent_by_class(-1, FKLCLASS))!= 0)
{
remove_entity(ent);
lampa_properites[4] = 0;
}
}
public lampa_damage(ent, attacker, Float:damage, Float:direction[3], trace, damagebits)
{
entity_get_string(ent, EV_SZ_classname, CLASS_NAME, charsmax(CLASS_NAME));
if(!equal(CLASS_NAME, FKLCLASS))
return HAM_IGNORED;
if(!is_valid_ent(ent))
return HAM_IGNORED;
static Float:e[3];
get_tr2(trace, TR_vecEndPos, e);
draw_spark(e);
return HAM_IGNORED;
}
public lampa_break(ent)
{
entity_get_string(ent, EV_SZ_classname, CLASS_NAME, charsmax(CLASS_NAME));
if(!equal(CLASS_NAME, FKLCLASS))
return HAM_IGNORED;
if(!is_valid_ent(ent))
return HAM_IGNORED;
static Float:o[3];
pev(ent, pev_origin, o);
lampa_properites[4] -= 1;
metal_gibs(o, 2);
metal_gibs(o, 1);
return HAM_IGNORED;
}
public lampa_touch(ent, touched)
{
#if defined WR_HAM
entity_get_string(ent, EV_SZ_classname, CLASS_NAME, charsmax(CLASS_NAME))
if(!equal(CLASS_NAME, FKLCLASS))
return HAM_IGNORED;
#endif
if(!is_valid_ent(ent))
return HAM_IGNORED;
static ground_ent; ground_ent = entity_get_edict(touched, EV_ENT_groundentity);
if(ground_ent)
return HAM_IGNORED;
static Float:v[3];
entity_get_vector(touched, EV_VEC_velocity, v);
static Float:v2[3];
entity_get_vector(ent, EV_VEC_velocity, v2);
v2[0] += v[0];
v2[1] += v[1];
v2[2] += v[2];
entity_set_vector(ent, EV_VEC_velocity, v2);
return HAM_IGNORED;
}
public lampa_think(ent)
{
#if defined WR_HAM
entity_get_string(ent, EV_SZ_classname, CLASS_NAME, charsmax(CLASS_NAME))
if(!equal(CLASS_NAME, FKLCLASS))
return HAM_IGNORED;
#endif
if(!is_valid_ent(ent))
return HAM_IGNORED;
static Float:o[3];
pev(ent, pev_origin, o);
new szRadius[4], szRed[4], szGreen[4], szBlue[4];
entity_get_string(ent, EV_SZ_noise, szRadius, 3);
entity_get_string(ent, EV_SZ_noise1, szRed, 3);
entity_get_string(ent, EV_SZ_noise2, szGreen, 3);
entity_get_string(ent, EV_SZ_noise3, szBlue, 3);
new iRadius = str_to_num(szRadius);
new iRed = str_to_num(szRed);
new iGreen = str_to_num(szGreen);
new iBlue = str_to_num(szBlue);
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, o, 0);
write_byte(TE_DLIGHT);
engfunc(EngFunc_WriteCoord, o[0]);
engfunc(EngFunc_WriteCoord, o[1]);
engfunc(EngFunc_WriteCoord, o[2]);
write_byte(iRadius); // radius in 10's
write_byte(iRed); // Red
write_byte(iGreen); // Green
write_byte(iBlue); // Bblue
write_byte(10); // Life
write_byte(0); // Decay Rate
message_end();
entity_set_float(ent, EV_FL_nextthink, get_gametime() + 0.3);
return HAM_IGNORED;
}
#if defined WG_SUPPORT
public grab_on(id)
{
if(!access(id, AccessFlag))
return;
new sClassname[32],target, trash;
get_user_aiming(id,target,trash);
pev(target, pev_classname, sClassname, sizeof sClassname - 1)
if(!strcmp(sClassname, FKLCLASS, 1))
{
if(target && is_valid_ent(target)&& target!=id)
{
client_print(id,print_chat,"[AMXX] Found Target");
grabem(id,target);
}
else
{
set_task(0.1,"grab_on",id);
}
}
}
public grabem(id,target)
{
grab[id]=target;
fm_set_rendering(target,kRenderFxGlowShell,50,12,21,kRenderTransColor,200);
grab_totaldis[id] = 0.0;
set_task(0.1,"grab_prethink",id+1000,"",0,"b");
grab_prethink(id+1000);
emit_sound(id,CHAN_VOICE,RIC, 1.0, ATTN_NORM, 0, PITCH_NORM);
}
public grab_off(id)
{
if(grab[id]==-1)
{
client_print(id,print_chat,"[AMXX] No Target Found");
grab[id]=0;
}
else if(grab[id]){
client_print(id,print_chat,"[AMXX] Target Released");
fm_set_rendering(grab[id]);
grab[id]=0;
}
}
public grab_prethink(id)
{
id -= 1000;
if(!is_valid_ent(id)&& grab[id]>0)
{
fm_set_rendering(grab[id]);
grab[id]=0;
}
if(!grab[id] || grab[id]==-1)
{
remove_task(id+1000);
return PLUGIN_HANDLED;
}
//Get Id's, target's, and Where Id is looking's origins
new origin1[3];
get_user_origin(id,origin1);
new Float:origin2_F[3], origin2[3];
entity_get_vector(grab[id],EV_VEC_origin,origin2_F);
origin2[0] = floatround(origin2_F[0]);
origin2[1] = floatround(origin2_F[1]);
origin2[2] = floatround(origin2_F[2]);
new origin3[3];
get_user_origin(id,origin3,3);
//Create red beam
message_begin(MSG_BROADCAST,SVC_TEMPENTITY);
write_byte(1); //TE_BEAMENTPOINT
write_short(id); // start ent
write_coord(origin2[0]);
write_coord(origin2[1]);
write_coord(origin2[2]);
write_short(spr_flbeam);
write_byte(1); // framestart
write_byte(1); // framerate
write_byte(1); // life in 0.1's
write_byte(5); // width
write_byte(0); // noise
write_byte(255); // red
write_byte(0); // green
write_byte(0); // blue
write_byte(200); // brightness
write_byte(0); // speed
message_end();
//Convert to floats for calculation
new Float:origin1_F[3];
new Float:origin3_F[3];
origin1_F[0] = float(origin1[0]);
origin1_F[1] = float(origin1[1]);
origin1_F[2] = float(origin1[2]);
origin3_F[0] = float(origin3[0]);
origin3_F[1] = float(origin3[1]);
origin3_F[2] = float(origin3[2]);
//Calculate target's new velocity
new Float:distance[3];
if(!grab_totaldis[id])
{
distance[0] = floatabs(origin1_F[0] - origin2_F[0]);
distance[1] = floatabs(origin1_F[1] - origin2_F[1]);
distance[2] = floatabs(origin1_F[2] - origin2_F[2]);
grab_totaldis[id] = floatsqroot(distance[0]*distance[0] + distance[1]*distance[1] + distance[2]*distance[2]);
}
distance[0] = origin3_F[0] - origin1_F[0];
distance[1] = origin3_F[1] - origin1_F[1];
distance[2] = origin3_F[2] - origin1_F[2];
new Float:grab_totaldis2;
grab_totaldis2 = floatsqroot(distance[0]*distance[0] + distance[1]*distance[1] + distance[2]*distance[2]);
new Float:que;
que = grab_totaldis[id] / grab_totaldis2;
new Float:origin4[3];
origin4[0] =(distance[0] * que)+ origin1_F[0];
origin4[1] =(distance[1] * que)+ origin1_F[1];
origin4[2] =(distance[2] * que)+ origin1_F[2];
new Float:velocity[3];
velocity[0] =(origin4[0] - origin2_F[0])* 5.0 / 1.666667;
velocity[1] =(origin4[1] - origin2_F[1])* 5.0 / 1.666667;
velocity[2] =(origin4[2] - origin2_F[2])* 5.0 / 1.666667;
set_pev(grab[id], pev_velocity, velocity);
return PLUGIN_CONTINUE;
}
#endif
FakeLampaEntity(Float:AimOrigin[3], Float:Angles[3], Radius, Red, Green, Blue)
{
static ent;
ent = create_entity("world_items"); //create_ent("func_pushable")create_ent("info_target")
new szRadius[4], szRed [4], szGreen[4], szBlue[4];
format(szRadius, 3, "%i", Radius);
format(szRed, 3, "%i", Red);
format(szGreen, 3, "%i", Green);
format(szBlue, 3, "%i", Blue);
if(!is_valid_ent(ent))
return;
entity_set_model(ent, FKLMODEL);
entity_set_size(ent,Float:{-10.0,-5.0,-1.0},Float:{10.0,5.0,18.0});
entity_set_int(ent,EV_INT_modelindex, g_FKMlin);
entity_set_int(ent,EV_INT_solid,SOLID_BBOX);
entity_set_int(ent,EV_INT_movetype, MOVETYPE_PUSHSTEP);
entity_set_string(ent,EV_SZ_classname,FKLCLASS);
entity_set_vector(ent,EV_VEC_origin,AimOrigin);
entity_set_vector(ent,EV_VEC_angles,Angles);
entity_set_float(ent,EV_FL_animtime, 1.0);
entity_set_float(ent,EV_FL_framerate, 1.0);
entity_set_float(ent,EV_FL_friction, 1.0);
if(get_pcvar_num(fkdamage))
entity_set_float(ent, EV_FL_takedamage, 1.0),
entity_set_float(ent, EV_FL_health, 100.0);
else
entity_set_float(ent, EV_FL_takedamage, 0.0);
entity_set_int(ent,EV_INT_sequence, 1);
entity_set_int(ent,EV_INT_gaitsequence, 1);
entity_set_string(ent, EV_SZ_noise, szRadius);
entity_set_string(ent, EV_SZ_noise1, szRed);
entity_set_string(ent, EV_SZ_noise2, szGreen);
entity_set_string(ent, EV_SZ_noise3, szBlue);
entity_set_float(ent, EV_FL_nextthink, get_gametime() + 0.5);
entity_set_origin(ent, AimOrigin);
entity_set_edict(ent, EV_ENT_groundentity, 1);
}
stock FKMesaje(index, text[])
{
message_begin(MSG_ONE,g_msgSayText,{0,0,0},index);
write_byte(index);
write_string(text);
message_end();
}
stock draw_spark(Float:origin[3])
{
message_begin(MSG_ALL, SVC_TEMPENTITY);
write_byte(TE_SPARKS);
engfunc(EngFunc_WriteCoord, origin[0]);
engfunc(EngFunc_WriteCoord, origin[1]);
engfunc(EngFunc_WriteCoord, origin[2]);
message_end();
}
stock metal_gibs(Float:origin[3], flags)
{
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, origin, 0);
write_byte(TE_BREAKMODEL); // TE_BREAKMODEL
engfunc(EngFunc_WriteCoord,origin[0]); // x
engfunc(EngFunc_WriteCoord,origin[1]); // y
engfunc(EngFunc_WriteCoord,origin[2] + 24); // z
engfunc(EngFunc_WriteCoord,10.0); // size x
engfunc(EngFunc_WriteCoord,10.0); // size y
engfunc(EngFunc_WriteCoord,10.0); // size z
engfunc(EngFunc_WriteCoord,random_num(-50,50)); // velocity x
engfunc(EngFunc_WriteCoord,random_num(-50,50)); // velocity y
engfunc(EngFunc_WriteCoord,25.0); // velocity z
write_byte(10); // random velocity
write_short(spr_flmetal); // model
write_byte(15); // count
write_byte(25); // life
write_byte(flags); // flags: BREAK_METAL
message_end();
}
#if defined WG_SUPPORT
// From fakemeta_utils
stock fm_set_rendering(ent, fx = kRenderFxNone, r = 255, g = 255, b = 255, render = kRenderNormal, amount = 16)
{
new Float:RenderColor[3];
RenderColor[0] = float(r);
RenderColor[1] = float(g);
RenderColor[2] = float(b);
set_pev(ent, pev_renderfx, fx);
set_pev(ent, pev_rendercolor, RenderColor);
set_pev(ent, pev_rendermode, render);
set_pev(ent, pev_renderamt, float(amount));
return 1;
}
#endif
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1036\\ f0\\ fs16 \n\\ par }
*/
.. can anyone help !!