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

Long shot Question about cs_arabstreets plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Ark_Procession
Senior Member
Join Date: Jun 2020
Location: Argentina
Old 05-01-2022 , 16:01   Re: Long shot Question about cs_arabstreets plugin
Reply With Quote #11

Quote:
Originally Posted by DJEarthQuake View Post
Since developer mode did not catch anything interesting, I would take it off. It works better with +condebug logging more of it. It makes qconsole.log on the mod's root directory, cstrike. I've updated the pick code so it cycles through 5 ents. The 4th door it opened turned on the lights. That was tested on, version : 48/1.1.2.7/Stdio 8684 secure (10) cs_arabstreets.
i am amazed at how you approached this workaround! works perfectly, now i will look into a way to this happen automatically, maybe a plugin that executes commands when server opens or on changelevel.


Thank you so much for this, has been really helpful!
Ark_Procession is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 05-01-2022 , 19:35   Re: Long shot Question about cs_arabstreets plugin
Reply With Quote #12

Glad there's hope!
You're welcome.
Code:
#include amxmodx
#include engine
#include fakemeta

#define PLUGIN  "cs_arabstreets"
#define VERSION "1.0"
#define AUTHOR  "SPiNX"

#define URL     "twhl.info/wiki/page/func_door_rotating"/* 
    Starts open (1) - Door starts in its 'open' position.
    Reverse Direction (2) - Reverse direction of rotation.
    Don't link (4) - Restricts the door from being linked to a door with the same name (preventing it from opening as part of a pair).
    Passable (8)
    One Way (16) - Door only opens in one direction.
    Toggle (32) - If checked, then every time the door is triggered it toggles its open/close state, instead of only opening it.
    X axis (64) - Door will rotate on its X axis.
    Y axis (128) - Door will rotate on its Y axis.
    Use only (256) - Player must "use" to open. Enabling this prevents the entity being triggered any other way.
    Monsters can't (512) - Monsters with arms (e.g. zombies, grunts) can't use the door.
    Not in Deathmatch (2048)*/
#define SPAWNFLAGS 367

public plugin_init()
{
    #if AMXX_VERSION_NUM != 110;
    register_plugin(PLUGIN, VERSION, AUTHOR)
    #else
    register_plugin(PLUGIN, VERSION, AUTHOR, URL)
    #endif
    new Arabian_lights = find_ent_by_target(-1,"lites")
    set_pev(Arabian_lights, pev_spawnflags, SPAWNFLAGS);
}
__________________

Last edited by DJEarthQuake; 05-03-2022 at 20:31. Reason: Url was pointed at the forums.
DJEarthQuake is offline
Ark_Procession
Senior Member
Join Date: Jun 2020
Location: Argentina
Old 05-04-2022 , 18:07   Re: Long shot Question about cs_arabstreets plugin
Reply With Quote #13

Quote:
Originally Posted by DJEarthQuake View Post
Glad there's hope!
You're welcome.
Code:
#include amxmodx
#include engine
#include fakemeta

#define PLUGIN  "cs_arabstreets"
#define VERSION "1.0"
#define AUTHOR  "SPiNX"

#define URL     "twhl.info/wiki/page/func_door_rotating"/* 
    Starts open (1) - Door starts in its 'open' position.
    Reverse Direction (2) - Reverse direction of rotation.
    Don't link (4) - Restricts the door from being linked to a door with the same name (preventing it from opening as part of a pair).
    Passable (8)
    One Way (16) - Door only opens in one direction.
    Toggle (32) - If checked, then every time the door is triggered it toggles its open/close state, instead of only opening it.
    X axis (64) - Door will rotate on its X axis.
    Y axis (128) - Door will rotate on its Y axis.
    Use only (256) - Player must "use" to open. Enabling this prevents the entity being triggered any other way.
    Monsters can't (512) - Monsters with arms (e.g. zombies, grunts) can't use the door.
    Not in Deathmatch (2048)*/
#define SPAWNFLAGS 367

public plugin_init()
{
    #if AMXX_VERSION_NUM != 110;
    register_plugin(PLUGIN, VERSION, AUTHOR)
    #else
    register_plugin(PLUGIN, VERSION, AUTHOR, URL)
    #endif
    new Arabian_lights = find_ent_by_target(-1,"lites")
    set_pev(Arabian_lights, pev_spawnflags, SPAWNFLAGS);
}
sorry to bother, what is this part supposed to do? should i use it with your plugin?
Ark_Procession is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 05-04-2022 , 18:20   Re: Long shot Question about cs_arabstreets plugin
Reply With Quote #14

When I played map. Round 1, the lights were off; then all others, they were on. I was under the impression this is what you requested. The offset from spawn flags. That first script was to probe. This is the finished product. Try it. Adjust spawn flags if needed.
__________________
DJEarthQuake is offline
Ark_Procession
Senior Member
Join Date: Jun 2020
Location: Argentina
Old 05-04-2022 , 18:22   Re: Long shot Question about cs_arabstreets plugin
Reply With Quote #15

Quote:
Originally Posted by DJEarthQuake View Post
When I played map. Round 1, the lights were off; then all others, they were on. I was under the impression this is what you requested. The offset from spawn flags. That first script was to probe. This is the finished product. Try it. Adjust spawn flags if needed.
in my particular case lights are off permantently in all rounds, unless i go and press the light switch.

Tested your plugin and still lights are off when i start the map.

if you are assumming i have more knowledge that i have, let me know what do you think i am missing from doing. this error is making me crazy
Ark_Procession is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 05-05-2022 , 11:07   Re: Long shot Question about cs_arabstreets plugin
Reply With Quote #16

Have you tried subtracting 1 from spawnflags, recompile, and test?
__________________
DJEarthQuake is offline
Ark_Procession
Senior Member
Join Date: Jun 2020
Location: Argentina
Old 05-05-2022 , 11:26   Re: Long shot Question about cs_arabstreets plugin
Reply With Quote #17

Quote:
Originally Posted by DJEarthQuake View Post
Have you tried subtracting 1 from spawnflags, recompile, and test?
Still nothing, but thanks for the effort!

Maybe some update in rehlds will fix this eventually
Ark_Procession is offline
Ark_Procession
Senior Member
Join Date: Jun 2020
Location: Argentina
Old 05-05-2022 , 11:40   Re: Long shot Question about cs_arabstreets plugin
Reply With Quote #18

the open sesame function works with the fourth entity. thats the one that turns on the lights when i bind the key and press it.

I believe i have to use both this code here and your plugin.. right? because that is what i am doing.

Lights will only turn on with binded key.
Ark_Procession is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 05-05-2022 , 12:21   Re: Long shot Question about cs_arabstreets plugin
Reply With Quote #19

The later script I made targets the '4th entry' directly. Apparently something else needs done to control the initial on/off state.
PHP Code:
#include amxmodx
#include engine
#include fakemeta
#include hamsandwich

#define PLUGIN  "cs_arabstreets"
#define VERSION "1.1"
#define AUTHOR  "SPiNX"

#define ONE "1.0"
#define TWO "2.0"
#define OFF    "0"
#define ONEWAY "1"
#define TWOWAY "2"
#define TOGGLE "3"
#define WORLD   0

#define URL     "twhl.info/wiki/page/func_door_rotating"

new XiUse_typeXfUse_float
new XiSpawnFlags
new g_Arabian_lights

public plugin_init()
{
    
#if AMXX_VERSION_NUM != 110;
    
register_plugin(PLUGINVERSIONAUTHOR)
    
#else
    
register_plugin(PLUGINVERSIONAUTHORURL)
    
#endif
    
XiSpawnFlags register_cvar("door_spawnflags""352")
    
register_logevent("@OnRound"2"1=Round_Start")

    
XiUse_type    register_cvar("use_type"TOGGLE)
    
XfUse_float   =  register_cvar("use_float"TWO)

    
g_Arabian_lights find_ent_by_target(-1,"lites")
    
set_pev(g_Arabian_lightspev_spawnflagsget_pcvar_num(XiSpawnFlags))

}

@
OnRound()
    
set_task(3.0,"@Inverse_light_currrent"96)

@
Inverse_light_currrent()
if(
get_pcvar_num(XiSpawnFlags) >= 96)
    
ExecuteHam(Ham_Useg_Arabian_lightsWORLDWORLDget_pcvar_num(XiUse_type), get_pcvar_num(XfUse_float)) 
__________________

Last edited by DJEarthQuake; 05-05-2022 at 15:52.
DJEarthQuake is offline
Ark_Procession
Senior Member
Join Date: Jun 2020
Location: Argentina
Old 05-05-2022 , 16:26   Re: Long shot Question about cs_arabstreets plugin
Reply With Quote #20

Quote:
Originally Posted by DJEarthQuake View Post
The later script I made targets the '4th entry' directly. Apparently something else needs done to control the initial on/off state.
PHP Code:
#include amxmodx
#include engine
#include fakemeta
#include hamsandwich

#define PLUGIN  "cs_arabstreets"
#define VERSION "1.1"
#define AUTHOR  "SPiNX"

#define ONE "1.0"
#define TWO "2.0"
#define OFF    "0"
#define ONEWAY "1"
#define TWOWAY "2"
#define TOGGLE "3"
#define WORLD   0

#define URL     "twhl.info/wiki/page/func_door_rotating"

new XiUse_typeXfUse_float
new XiSpawnFlags
new g_Arabian_lights

public plugin_init()
{
    
#if AMXX_VERSION_NUM != 110;
    
register_plugin(PLUGINVERSIONAUTHOR)
    
#else
    
register_plugin(PLUGINVERSIONAUTHORURL)
    
#endif
    
XiSpawnFlags register_cvar("door_spawnflags""352")
    
register_logevent("@OnRound"2"1=Round_Start")

    
XiUse_type    register_cvar("use_type"TOGGLE)
    
XfUse_float   =  register_cvar("use_float"TWO)

    
g_Arabian_lights find_ent_by_target(-1,"lites")
    
set_pev(g_Arabian_lightspev_spawnflagsget_pcvar_num(XiSpawnFlags))

}

@
OnRound()
    
set_task(3.0,"@Inverse_light_currrent"96)

@
Inverse_light_currrent()
if(
get_pcvar_num(XiSpawnFlags) >= 96)
    
ExecuteHam(Ham_Useg_Arabian_lightsWORLDWORLDget_pcvar_num(XiUse_type), get_pcvar_num(XfUse_float)) 
i am about to recreate the whole map myself.

this works sometimes, and often lights keep being turned off, and sometimes, it takes really long for them to turn on

Last edited by Ark_Procession; 05-05-2022 at 16:26.
Ark_Procession is offline
Reply


Thread Tools
Display Modes

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 17:12.


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