Raised This Month: $51 Target: $400
 12% 

Fake Lampa


Post New Thread Reply   
 
Thread Tools Display Modes
cs1.7
Senior Member
Join Date: Oct 2008
Old 07-29-2009 , 13:48   Re: Fake Lampa
Reply With Quote #21

hmm when testing..my client starts to lag..but maybe my client needs reinstall
cs1.7 is offline
nisam_ja
BANNED
Join Date: Sep 2008
Location: osijek
Old 08-07-2009 , 14:30   Re: Fake Lampa
Reply With Quote #22

^stick on this one ;)
nisam_ja is offline
Send a message via MSN to nisam_ja Send a message via Skype™ to nisam_ja
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 08-14-2009 , 17:05   Re: Fake Lampa
Reply With Quote #23

There are major errors in this that prevent it from being approved. Here are some of them:

The code is nonsensical at parts.

The description for this plugin is inadequate and should be revised.

If you would like any information regarding possible adjustments you could make or things you could do to make this better, please feel free to post here or PM me.

Unapproved.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Exta5y
New Member
Join Date: Jan 2010
Old 01-04-2010 , 23:39   Re: Fake Lampa
Reply With Quote #24

Hi all, I did it. Menu is work.

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <xs>

/* 
Fake Lampa 
  Improven the Light on the dark map
*/

#define fm_find_ent_by_class(%1,%2) engfunc(EngFunc_FindEntityByString, %1, "classname", %2)

new const FK8888_model[][] = {    "models/FK8888.mdl" }            // model
new const FK8888_classname[]     = "FK8888"

new g_FKlen;
new 
fsaytext;
new 
g_FKet[33] = 0;

new 
AccessFlag ADMIN_CVAR

public plugin_init() 
{
    
register_plugin("Fake LAMPA""2.0""Katakuna")
    
    
register_clcmd("FKADD""CFK8888", -1)
    
register_clcmd("FKDEL""RFK8888", -1)
    
register_clcmd("FKSAVE""SFK8888n", -1)
    
/* Meniu More Great Ideea*/
    
register_clcmd("say /FKMENU","FKOPEN_MENU",0)
    
register_clcmd("say_team /FKMENU","FKOPEN_MENU",0)
    
register_clcmd("FKMENU","FKOPEN_MENU",0)
    
fsaytext get_user_msgid("fsaytext")


}

public 
plugin_precache()
{
    
precache_model("models/FK8888.mdl")
}

//public plugin_menu() {
public FKOPEN_MENU(id) {
    
g_FKlen menu_create("\rFake Lampa Menu","FKMENU_HANDLER");
    
    
menu_additem(g_FKlen,"\wFake Lampa \rAdd !","1",0);
    
menu_additem(g_FKlen,"\wFake Lampa \rRemove !","2",0);
    
menu_additem(g_FKlen,"\wFake Lampa \rSave !","3",0);
    
    
menu_setprop(g_FKlen,MPROP_EXIT,MEXIT_ALL)
    
    
menu_display(id,g_FKlen,0)
}

/*
public FKOPEN_MENU(id) {
    if(!is_user_connected(id)) return;
    menu_display(id,g_FKlen,0);
}
*/

public FKMENU_HANDLER(id,menu,item){
    
    if(
item == MENU_EXIT)
    {
        return 
PLUGIN_HANDLED;
    }

    static 
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: {
            
console_cmd(id"FKADD"/* Add Fake Lampa */            
            
formatex(Buffer,127,"^x03Fake Lampa Menu^x01 Fake Lampa Added !")
            
g_FKet[id] = 1;
            
menu_display(id,g_FKlen,0)
        }
        case 
2: {
            
console_cmd(id"FKDEL"/* Remov Fake Lampa */
            
formatex(Buffer,127,"^x03Fake Lampa Menu^x01 Fake Lampa Remove !")
            
g_FKet[id] = 2;
            
menu_display(id,g_FKlen,0)
        }
        case 
3: {
            
console_cmd(id"FKSAVE"/* Save Fake Lampa */            
            
formatex(Buffer,127,"^x03Fake Lampa Menu^x01 Fake Lampa Saved !")
            
g_FKet[id] = 3;
            
menu_display(id,g_FKlen,0)
        }
    }
    
/*
    message_begin(MSG_ONE,fsaytext,_,id)
    write_byte(id);
    write_string(Buffer);
    message_end();
    */
    
return PLUGIN_HANDLED;
}


public 
plugin_cfg()
{
    static 
ConfigsDir[64], File[64], MapName[32]
    
    
get_configsdir(ConfigsDirsizeof ConfigsDir 1)
    
get_mapname(MapNamesizeof MapName 1)
    
    
formatex(Filesizeof File 1"%s/%s_FK8888.cfg"ConfigsDirMapName)

    if(!
file_exists(File))
        return 
1
    
    
static FileOrigin[3][32], FileAngles[3][32], LineLengthBuffer[256]
    static 
Temp1[128], Temp2[128]
    static 
Float:fOrigin[3], Float:fAngles[3]
    
    while(
read_file(FileLine++, Buffersizeof Buffer 1Length))
    {
        if((
Buffer[0]==';') || !Length)
            continue
        
        
strtok(BufferTemp1sizeof Temp1 1Temp2sizeof Temp2 1'|'0)
        
        
parse(Temp1FileOrigin[0], sizeof FileOrigin[] - 1FileOrigin[1], sizeof FileOrigin[] - 1FileOrigin[2], sizeof FileOrigin[] - 1)
        
        
fOrigin[0] = str_to_float(FileOrigin[0])
        
fOrigin[1] = str_to_float(FileOrigin[1])
        
fOrigin[2] = str_to_float(FileOrigin[2])
        
        
parse(Temp2FileAngles[0], sizeof FileAngles[] - 1FileAngles[1], sizeof FileAngles[] - 1FileAngles[2], sizeof FileAngles[] - 1)
        
        
fAngles[0] = str_to_float(FileAngles[0])
        
fAngles[1] = str_to_float(FileAngles[1])
        
fAngles[2] = str_to_float(FileAngles[2])
        
        static 
ent
        ent 
engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"info_target"))
        
        if(!
ent)
            return 
0
        
        engfunc
(EngFunc_SetOriginentfOrigin)
        
set_pev(entpev_anglesfAngles)
        
        
engfunc(EngFunc_SetModelentFK8888_model[random_num(0,sizeof FK8888_model 1)])
        
set_pev(entpev_classnameFK8888_classname)
        
        
dllfunc(DLLFunc_Spawnent)
        
set_pev(entpev_solidSOLID_BBOX)
        
set_pev(entpev_takedamage,DAMAGE_NO)
        
set_pev(entpev_movetypeMOVETYPE_NONE)
        
set_pev(entpev_effects, (EF_BRIGHTLIGHT))
        
engfunc(EngFunc_AllocStringent ,"func_wall")
        
engfunc(EngFunc_SetSizeentFloat:{ -4.0, -4.0, -4.0 }, Float:{ 4.04.04.0 } );
    }
    return 
1
}

public 
CFK8888(id)
{
    if(!
access(idAccessFlag))
        return 
1
    
    
static Float:fAimOrigin[3]
    
fm_get_aimorigin(idfAimOrigin)
    
    
// create a new entity 
    // set a name to the entity
    
if((engfunc(EngFunc_PointContentsfAimOrigin) != CONTENTS_SKY) && (engfunc(EngFunc_PointContentsfAimOrigin) != CONTENTS_SOLID))
    {
        static 
ent
        ent 
engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"info_target"))
        
        if(!
ent)
            return 
0
        
        engfunc
(EngFunc_SetOriginentfAimOrigin)
        
engfunc(EngFunc_SetModelentFK8888_model[random_num(0,sizeof FK8888_model 1)])
    
        
set_pev(entpev_classnameFK8888_classname)
    
        
dllfunc(DLLFunc_Spawnent)
        
set_pev(entpev_solidSOLID_BBOX)
        
set_pev(entpev_takedamage,DAMAGE_NO)
        
set_pev(entpev_movetypeMOVETYPE_NONE)
        
set_pev(entpev_effects, (EF_BRIGHTLIGHT))
        
engfunc(EngFunc_AllocStringent ,"func_wall")
        
engfunc(EngFunc_SetSizeentFloat:{ -4.0, -4.0, -4.0 }, Float:{ 4.04.04.0 } );
        
engfunc(EngFunc_DropToFloorent)
    }
    else
        
client_print(idprint_chat"This location is forbite")
    return 
0
}

public 
RFK8888(id)
{
    if(!
access(idAccessFlag))
        return 
1
    
    
static entiBody
    get_user_aiming
(identiBody)
    
    if(
pev_valid(ent))
    {
        static 
sClassname[32]
        
pev(entpev_classnamesClassnamesizeof sClassname 1)
        
        if(!
strcmp(sClassnameFK8888_classname1))
        {
            
engfunc(EngFunc_RemoveEntityent)
            
            
client_print(idprint_chat"FK8888 DELETE")
        }
        else
            
client_print(idprint_chat"FK8888 NOT FOUND")
    }
    return 
0
}    

public 
SFK8888n(id)
{
    if(!
access(idAccessFlag))
        return 
1

    
    
static ConfigsDir[64], File[64], Buffer[256], MapName[32]
    
    
get_configsdir(ConfigsDirsizeof ConfigsDir 1)
    
get_mapname(MapNamesizeof MapName 1)
    
    
formatex(Filesizeof File 1"%s/%s_FK8888.cfg"ConfigsDirMapName)
    
    if(
file_exists(File))
        
delete_file(File)
    
    new 
ent = -1Float:fEntOrigin[3], Float:fEntAngles[3]
    
    while((
ent engfunc(EngFunc_FindEntityByStringent"classname"FK8888_classname)))
    {
        
pev(entpev_originfEntOrigin)
        
pev(entpev_anglesfEntAngles)
        
        
formatex(Buffersizeof Buffer 1"%f %f %f | %f %f %f"fEntOrigin[0], fEntOrigin[1], fEntOrigin[2], fEntAngles[0], fEntAngles[1], fEntAngles[2])
        
        
write_file(FileBuffer, -1)
    }
    
client_print(idprint_chat"FK8888 SAVED %s"MapName)
    
    return 
0
}


/* credited to VEN - fakemeta_util.inc */
stock fm_get_aimorigin(indexFloat:origin[3])
{
    new 
Float:start[3], Float:view_ofs[3];
    
pev(indexpev_originstart);
    
pev(indexpev_view_ofsview_ofs);
    
xs_vec_add(startview_ofsstart);
    
    new 
Float:dest[3];
    
pev(indexpev_v_angledest);
    
engfunc(EngFunc_MakeVectorsdest);
    
global_get(glb_v_forwarddest);
    
xs_vec_mul_scalar(dest9999.0dest);
    
xs_vec_add(startdestdest);
    
    
engfunc(EngFunc_TraceLinestartdest0index0);
    
get_tr2(0TR_vecEndPosorigin);
    
    return 
1;

p.s.
sorry for my bad english
Exta5y is offline
GordonFreeman (RU)
Veteran Member
Join Date: Jan 2010
Location: Uzbekistan
Old 01-06-2010 , 02:58  
Reply With Quote #25

Flashlight?

HD Show!

HD Model! Nice View!

Last edited by YamiKaitou; 01-06-2010 at 10:19.
GordonFreeman (RU) is offline
Owyn
Veteran Member
Join Date: Nov 2007
Old 01-06-2010 , 17:41   Re: Fake Lampa
Reply With Quote #26

cool idea)

would be nice a version without models, just light
__________________
☜ Free Mozy ☂backup\҉sync user
Quote:
Американский форум - Задаёшь вопрос, потом тебе отвечают.
Израильский форум - Задаёшь вопрос, потом тебе задают вопрос.
Русский форум - Задаёшь вопрос, потом тебе долго рассказывают, какой ты мудак.
Owyn is offline
Send a message via ICQ to Owyn
GordonFreeman (RU)
Veteran Member
Join Date: Jan 2010
Location: Uzbekistan
Old 01-06-2010 , 21:54   Re: Fake Lampa
Reply With Quote #27

Quote:
Американский форум - Задаёшь вопрос, потом тебе отвечают.
Израильский форум - Задаёшь вопрос, потом тебе задают вопрос.
Русский форум - Задаёшь вопрос, потом тебе долго рассказывают, какой ты мудак.
Haaa :-D
__________________
The functional way is the right way
GordonFreeman (RU) is offline
ZiTnO_O
Member
Join Date: Jul 2012
Location: at home
Old 08-26-2012 , 14:06   Re: Fake Lampa
Reply With Quote #28

is there is any other lamp models we can use on this plugin !!!

Quote:
Originally Posted by ZiTnO_O View Post
I am using this plugin Fake Lampa .. its really cool but can I change the model !!!

[IMG]http://img43.**************/img43/5716/halflife02.jpg[/IMG]
ZiTnO_O is offline
Send a message via Skype™ to ZiTnO_O
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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