AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved/Old Plugins (https://forums.alliedmods.net/forumdisplay.php?f=27)
-   -   Fake Lampa (https://forums.alliedmods.net/showthread.php?t=96433)

Katakuna 07-05-2009 06:17

Fake Lampa
 
2 Attachment(s)
> This plugin put the fake lampa who illuminate on every dark map, special for biohazard, zombie plague.

Fake Lampa
Versiune: 2.0
Autor : Katakuna

ADMINISTRATIVE Commands
FKADD - Insert the lamp on that place
FKDEL - Delet the lamp from that place
FKSAVE - Save all lamp on the place
FKMENU - Open the lampa meniu

IMG
FAKE 1
FAKE 2
FAKE 3

Arkshine 07-05-2009 06:39

Re: Fake Lampa
 
Nice model^^. Btw, no need to attach *.amxx and you should use .zip file, not rar.

crazyeffect 07-05-2009 07:00

Re: Fake Lampa
 
Cool :P

But arent the pictures a little bit too big :P

xPaw 07-05-2009 07:17

Re: Fake Lampa
 
Hehe, i have lights creator in my bm, there used small light sprite, and its have color what color around it xD btw nice model and resize screens pls

SchlumPF* 07-05-2009 07:25

Re: Fake Lampa
 
Quote:

Originally Posted by xPaw (Post 864764)
Hehe, i have lights creator in my bm, there used small light sprite, and its have color what color around it xD btw nice model and resize screens pls

nobody asked you whats in your bm plugin, go away <3

for the screens, dont resize them, just add them to the attached files.

crazyeffect 07-05-2009 08:02

Re: Fake Lampa
 
Thats what i meant...

There too big for in a post :D

And some aren't working

5c0r-|3i0 07-05-2009 09:40

Re: Fake Lampa
 
WoW.. Kool :X

Alucard^ 07-05-2009 11:41

Re: Fake Lampa
 
2 suggests:

1- add a menu for creating the lampas
2- u can do a version without the model? i mean, only a light... or tell me what i have to comment in the code =p.

good plugin , rly good

meTaLiCroSS 07-05-2009 15:57

Re: Fake Lampa
 
PHP Code:

register_clcmd("FKADD""CFK8888", -1

Where you come from? :|

DruGzOG 07-05-2009 17:01

Re: Fake Lampa
 
Make this multilingual

Fix this code :)

PHP Code:

client_print(idprint_chat"FK8888 DELET"


to
PHP Code:

client_print(idprint_chat"FK8888 DELETE"

Just a spelling error :)

tuty 07-05-2009 19:20

Re: Fake Lampa
 
Quote:

Originally Posted by meTaLiCroSS (Post 865128)
PHP Code:

register_clcmd("FKADD""CFK8888", -1

Where you come from? :|

dont ask xD

you should add credits!

Credits goes to Alka because you used a part of his code. :)

Nice plugin.

koleos 07-05-2009 20:00

Re: Fake Lampa
 
What about
1. Adding a menu?
2. Add "+lampgrab" so we can grab the lamp and place it where ever we want
3. Have an option to choose different Colors.

Katakuna 07-06-2009 02:26

Re: Fake Lampa
 
Credits goes to Alka because you used a part of his code. :)
You have definitely right because i inspirate from his code

Quote:

Originally Posted by koleos (Post 865271)
What about
1. Adding a menu?
2. Add "+lampgrab" so we can grab the lamp and place it where ever we want
3. Have an option to choose different Colors.

1. Maybe in the next version
2. Relay good idea but i don't now who i can do it, to move the ent
3. And what about different color you mean color of lamp or color of Light i still can not get it.

SchlumPF* 07-06-2009 05:18

Re: Fake Lampa
 
colors of the light i guess

ALIENMODSX 07-06-2009 08:36

Re: Fake Lampa
 
This would be nice to have for humans to buy in ZP.

koleos 07-06-2009 10:40

Re: Fake Lampa
 
Quote:

Originally Posted by Katakuna (Post 865449)
1. Maybe in the next version
2. Relay good idea but i don't now who i can do it, to move the ent
3. And what about different color you mean color of lamp or color of Light i still can not get it.

1. Thanks
2. Look at blockmaker by Necro
3. Like instead of White its gonna bright in different colors (light) Like in menu add an option choose color : 1.Red 2.Blue 3.Purple ....

meTaLiCroSS 07-07-2009 20:05

Re: Fake Lampa
 
Quote:

Originally Posted by ALIENMODSX (Post 865616)
This would be nice to have for humans to buy in ZP.

Idem. I will try it :D

cs1.7 07-29-2009 13:02

Re: Fake Lampa
 
wow awesome plugin!!! :)

some maps are too dark! gonna test this now! thanks to Katakuna

+karma!

joaquimandrade 07-29-2009 13:07

Re: Fake Lampa
 
This plugin contains the two leetest lines ever:

PHP Code:

new const FK8888_model[][] = {    "models/FK8888.mdl" }            // model
...
engfunc(EngFunc_SetModelentFK8888_model[random_num(0,sizeof FK8888_model 1)]) 


Jellric 07-29-2009 13:33

Re: Fake Lampa
 
I wish something like this was available for HLDM. I have some secret rooms which are dark and need illuminating.

cs1.7 07-29-2009 13:48

Re: Fake Lampa
 
hmm when testing..my client starts to lag..but maybe my client needs reinstall

nisam_ja 08-07-2009 14:30

Re: Fake Lampa
 
^stick on this one ;)

Hawk552 08-14-2009 17:05

Re: Fake Lampa
 
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.

Exta5y 01-04-2010 23:39

Re: Fake Lampa
 
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 :oops:

GordonFreeman (RU) 01-06-2010 02:58

Flashlight?

HD Show!

HD Model! Nice View!

Owyn 01-06-2010 17:41

Re: Fake Lampa
 
cool idea)

would be nice a version without models, just light

GordonFreeman (RU) 01-06-2010 21:54

Re: Fake Lampa
 
Quote:

Американский форум - Задаёшь вопрос, потом тебе отвечают.
Израильский форум - Задаёшь вопрос, потом тебе задают вопрос.
Русский форум - Задаёшь вопрос, потом тебе долго рассказывают, какой ты мудак.
Haaa :-D

ZiTnO_O 08-26-2012 14:06

Re: Fake Lampa
 
is there is any other lamp models we can use on this plugin !!!

Quote:

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

[IMG]http://img43.**************/img43/5716/halflife02.jpg[/IMG]



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

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