AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   (for PRO's) help me fix this plugin or tell me what's wrong with it !! (https://forums.alliedmods.net/showthread.php?t=194253)

ZiTnO_O 08-26-2012 15:01

(for PRO's) help me fix this plugin or tell me what's wrong with it !!
 
guys I am using Fake Lampa 2.6 b1 and when I try to save the lamps positions I get this error

PHP Code:

L 06/07/2009 05:47:02Couldn't write file "cstrike\addons\amxmodx\configs\FLE\de_dust_FLE.cfg"
L 06/07/2009 - 05:47:02: [AMXX] Displaying debug trace (plugin "fake_lampa2.6_b1.amxx")
L 06/07/2009 - 05:47:02: [AMXX] Run time error 10: native error (native "write_file")
L 06/07/2009 - 05:54:30: [AMXX]    [0] 87494.attach::SFLE (line 360)
L 06/07/2009 - 05:54:30: [AMXX]    [1] 87494.attach::FKMENU_HANDLER (line 220) 

I am using this one



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_msgSayTextg_FKMling_FKleng_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",    VERSIONFCVAR_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_CONFIGScharsmax(DIR_CONFIGS))], charsmax(DIR_CONFIGS), "/FLE");
    
formatex(MAP_NAME[get_mapname(MAP_NAMEcharsmax(MAP_NAME))], charsmax(MAP_NAME), "_FLE");
    
formatex(filenamecharsmax(filename), "%s/%s.cfg"DIR_CONFIGSMAP_NAME);
    
    if(!
file_exists(filename))
        return 
PLUGIN_CONTINUE;
    
    new 
FileOrigin[3][32], FileAngles[3][32], LineLengthBuffer[256];
    new 
Temp1[128], Temp2[128];
    new 
Float:fAimOrigin[3], Float:fAngles[3];
    new 
szRadius[4], szRed[4], szGreen[4], szBlue[4];
    new 
iRadiusiRediGreeniBlue;
    
    new 
pcvarmax get_pcvar_num(fknummax);
    if(
lampa_properites[4] >= pcvarmax)
        return 
PLUGIN_CONTINUE;
    
    while(
read_file(filenameLine++, Buffercharsmax(Buffer), Length))
    {
        if((
Buffer[0]==';')|| !Length)
            continue;
        
        
strtok(BufferTemp1charsmax(Temp1), Temp2charsmax(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,
        
szRadiuscharsmax(szRadius),
        
szRedcharsmax(szRed),
        
szGreencharsmax(szGreen),
        
szBluecharsmax(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(idAccessFlag))
        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(idAccessFlag))
        return;
    
    new 
Origin[3];
    
get_user_origin(idOrigin);
    
    new 
AimOrigin[3];
    
get_user_origin(idAimOrigin3);
    
    new 
Float:fAimVec[3];
    
IVecFVec(AimOriginfAimVec);
    
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(vectorfVector);
    
    new 
Float:fAngles[3];
    
vector_to_angle(fVectorfAngles);
    
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(Messages191"^4[FLE]^1Fake Lampa Entity's Added. ^4Count: ^1[ %d ]"lampa_properites[4]);
        
FKMesaje(idMessages);
    }
    else
        
FKMesaje(id"^4[FLE]^1This location is forbite");
}

public 
RFLE(id)
{
    if(!
access(idAccessFlag))
        return;
    new 
entiBodyMessages[192];
    
get_user_aiming(identiBody);
    
    if(
is_valid_ent(id))
    {
        
entity_get_string(entEV_SZ_classnameCLASS_NAMEcharsmax(CLASS_NAME));
        
        if(!
strcmp(CLASS_NAMEFKLCLASS1))
        {
            
remove_entity(ent);
            
lampa_properites[4] -= 1;
            
format(Messages191"^4[FLE]^1Fake Lampa Entity's DELETE. ^4Remain ^1[ %d ]"lampa_properites[4]);
            
FKMesaje(idMessages);
        }
        else
            
FKMesaje(id"^4[FLE]^1Fake Lampa Entity's NOT FOUND!!!");
    }
}    

public 
SFLE(id)
{
    if(!
access(idAccessFlag))
        return;
    
    new 
filename[64], Buffer[256], Messages[192];
    
    
formatex(DIR_CONFIGS[get_configsdir(DIR_CONFIGScharsmax(DIR_CONFIGS))], charsmax(DIR_CONFIGS), "/FLE");
    
formatex(MAP_NAME[get_mapname(MAP_NAMEcharsmax(MAP_NAME))], charsmax(MAP_NAME), "_FLE");
    
formatex(filenamecharsmax(filename), "%s/%s.cfg"DIR_CONFIGSMAP_NAME);
    
    if(
file_exists(filename))
        
delete_file(filename);
    
    new 
Float:fEntOrigin[3], Float:fEntAngles[3];
    
    static 
ent = -1;
    
    while((
ent find_ent_by_class(entFKLCLASS)) != 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(entEV_SZ_noiseszRadius3);
        
entity_get_string(entEV_SZ_noise1szRed3);
        
entity_get_string(entEV_SZ_noise2szGreen3);
        
entity_get_string(entEV_SZ_noise3szBlue3);
        
        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(Buffercharsmax(Buffer), "%f %f %f %f %f %f | %i %i %i %i",
        
fEntOrigin[0], fEntOrigin[1], fEntOrigin[2],
        
fEntAngles[0], fEntAngles[1], fEntAngles[2],
        
iRadiusiRediGreeniBlue);
        
        
write_file(filenameBuffer, -1);
    }
    
format(Messages191"^4[FLE]^1Fake Lampa Entity's SAVED /FLE. ^4Count: ^1[ %d ]"lampa_properites[4]);
    
FKMesaje(idMessages);
}

public 
RAFLE(id)
{
    if(!
access(idAccessFlag))
        return;
    
    new 
ent;
    
ent  = -1;
    while((
ent find_ent_by_class(-1FKLCLASS))!= 0)
    { 
        
remove_entity(ent);
        
lampa_properites[4] = 0;
    }
}

public 
lampa_damage(entattackerFloat:damageFloat:direction[3], tracedamagebits)
{
    
entity_get_string(entEV_SZ_classnameCLASS_NAMEcharsmax(CLASS_NAME));
    
    if(!
equal(CLASS_NAMEFKLCLASS))
        return 
HAM_IGNORED;
    
    if(!
is_valid_ent(ent))
        return 
HAM_IGNORED;
    
    static 
Float:e[3];
    
get_tr2(traceTR_vecEndPose);
    
draw_spark(e);
    
    return 
HAM_IGNORED;
}

public 
lampa_break(ent)
{
    
entity_get_string(entEV_SZ_classnameCLASS_NAMEcharsmax(CLASS_NAME));
    
    if(!
equal(CLASS_NAMEFKLCLASS))
        return 
HAM_IGNORED;
    
    if(!
is_valid_ent(ent))
        return 
HAM_IGNORED;
    
    static 
Float:o[3];
    
pev(entpev_origino);
    
lampa_properites[4] -= 1;
    
metal_gibs(o2);
    
metal_gibs(o1);
    
    return 
HAM_IGNORED;
}

public 
lampa_touch(enttouched)
{
    
#if defined WR_HAM
    
entity_get_string(entEV_SZ_classnameCLASS_NAMEcharsmax(CLASS_NAME))
    
    if(!
equal(CLASS_NAMEFKLCLASS))
        return 
HAM_IGNORED;
    
#endif
    
    
if(!is_valid_ent(ent))
        return 
HAM_IGNORED;
    
    static 
ground_entground_ent entity_get_edict(touchedEV_ENT_groundentity);
    
    if(
ground_ent)
        return 
HAM_IGNORED;
    
    static 
Float:v[3];
    
entity_get_vector(touchedEV_VEC_velocityv);
    
    static 
Float:v2[3];
    
entity_get_vector(entEV_VEC_velocityv2);
    
    
v2[0] += v[0];
    
v2[1] += v[1];
    
v2[2] += v[2];
    
    
entity_set_vector(entEV_VEC_velocityv2);
    
    return 
HAM_IGNORED;
}

public 
lampa_think(ent)
{
    
#if defined WR_HAM
    
entity_get_string(entEV_SZ_classnameCLASS_NAMEcharsmax(CLASS_NAME))
    
    if(!
equal(CLASS_NAMEFKLCLASS))
        return 
HAM_IGNORED;
    
#endif
    
    
if(!is_valid_ent(ent))
        return 
HAM_IGNORED;
    
    static 
Float:o[3];
    
pev(entpev_origino);
    
    new 
szRadius[4], szRed[4], szGreen[4], szBlue[4];
    
    
entity_get_string(entEV_SZ_noiseszRadius3);
    
entity_get_string(entEV_SZ_noise1szRed3);
    
entity_get_string(entEV_SZ_noise2szGreen3);
    
entity_get_string(entEV_SZ_noise3szBlue3);
    
    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_MessageBeginMSG_PVSSVC_TEMPENTITYo0);
    
write_byte(TE_DLIGHT);
    
engfunc(EngFunc_WriteCoordo[0]);
    
engfunc(EngFunc_WriteCoordo[1]);
    
engfunc(EngFunc_WriteCoordo[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(entEV_FL_nextthinkget_gametime() + 0.3);
    
    return 
HAM_IGNORED;
}

#if defined WG_SUPPORT
public grab_on(id)
{
    if(!
access(idAccessFlag))
        return;
    
    new 
sClassname[32],targettrash;
    
get_user_aiming(id,target,trash);
    
    
pev(targetpev_classnamesClassnamesizeof sClassname 1)
    if(!
strcmp(sClassnameFKLCLASS1))
    {
        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,RIC1.0ATTN_NORM0PITCH_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_velocityvelocity);
    
    return 
PLUGIN_CONTINUE;
}
#endif

FakeLampaEntity(Float:AimOrigin[3], Float:Angles[3], RadiusRedGreenBlue)
{
    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(szRadius3"%i"Radius);
    
format(szRed3"%i"Red);
    
format(szGreen3"%i"Green);
    
format(szBlue3"%i"Blue);
    
    if(!
is_valid_ent(ent))
        return;
    
    
entity_set_model(entFKLMODEL);
    
entity_set_size(ent,Float:{-10.0,-5.0,-1.0},Float:{10.0,5.0,18.0});
    
entity_set_int(ent,EV_INT_modelindexg_FKMlin);
    
entity_set_int(ent,EV_INT_solid,SOLID_BBOX);
    
entity_set_int(ent,EV_INT_movetypeMOVETYPE_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_animtime1.0);
    
entity_set_float(ent,EV_FL_framerate1.0);
    
entity_set_float(ent,EV_FL_friction1.0);
    if(
get_pcvar_num(fkdamage))
        
entity_set_float(entEV_FL_takedamage1.0),
    
entity_set_float(entEV_FL_health100.0);
    else
        
entity_set_float(entEV_FL_takedamage0.0);
    
entity_set_int(ent,EV_INT_sequence1);
    
entity_set_int(ent,EV_INT_gaitsequence1);
    
entity_set_string(entEV_SZ_noiseszRadius);
    
entity_set_string(entEV_SZ_noise1szRed);
    
entity_set_string(entEV_SZ_noise2szGreen);
    
entity_set_string(entEV_SZ_noise3szBlue);
    
entity_set_float(entEV_FL_nextthinkget_gametime() + 0.5);
    
entity_set_origin(entAimOrigin);
    
entity_set_edict(entEV_ENT_groundentity1);
}

stock FKMesaje(indextext[])
{
    
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_ALLSVC_TEMPENTITY);
    
write_byte(TE_SPARKS);
    
engfunc(EngFunc_WriteCoordorigin[0]);
    
engfunc(EngFunc_WriteCoordorigin[1]);
    
engfunc(EngFunc_WriteCoordorigin[2]);
    
message_end();    
}

stock metal_gibs(Float:origin[3], flags)
{
    
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYorigin0);
    
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(entfx kRenderFxNone255255255render kRenderNormalamount 16)
{
    new 
Float:RenderColor[3];
    
RenderColor[0] = float(r);
    
RenderColor[1] = float(g);
    
RenderColor[2] = float(b);
    
    
set_pev(entpev_renderfxfx);
    
set_pev(entpev_rendercolorRenderColor);
    
set_pev(entpev_rendermoderender);
    
set_pev(entpev_renderamtfloat(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 !!

YamiKaitou 08-26-2012 15:02

Re: (for PRO's) help me fix this plugin or tell me what's wrong with it !!
 
Post in the plugin's thread

ZiTnO_O 08-26-2012 15:05

Re: (for PRO's) help me fix this plugin or tell me what's wrong with it !!
 
where ? :P

YamiKaitou 08-26-2012 15:32

Re: (for PRO's) help me fix this plugin or tell me what's wrong with it !!
 
Post your issue in the thread that you found the plugin in.

ZiTnO_O 08-26-2012 15:40

Re: (for PRO's) help me fix this plugin or tell me what's wrong with it !!
 
ahh I did :)

matsi 08-26-2012 17:35

Re: (for PRO's) help me fix this plugin or tell me what's wrong with it !!
 
Why don't you use this(?):
http://forums.alliedmods.net/showthread.php?t=120134

ZiTnO_O 08-28-2012 14:42

Re: (for PRO's) help me fix this plugin or tell me what's wrong with it !!
 
Quote:

Originally Posted by matsi (Post 1783656)

I did't knw abt it .. thank you :)


All times are GMT -4. The time now is 20:14.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.