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

Unlock elevator trigger


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Gold Fish
Senior Member
Join Date: Mar 2020
Old 02-23-2021 , 04:49   Unlock elevator trigger
Reply With Quote #1

Greetings.
Why, when unlocking the elevator button and after activating the button, the elevator does not run? The bug occurs when there are more than 4-5 people on the server

unblocking like this:

PHP Code:
if (StrEqual(mapName"c8m4_interior"false)) 
{
PrintToChatAll("AcceptEntityInput elevator_button unlock");
Entity FindEntityWildcard("elevator_button");
if (
IsValidEntity(Entity)) AcceptEntityInput(Entity"unlock"client);

}

...
    
int FindEntityWildcard(const char [] Name, const int Start = -1)
{
    
// To hold the name taken from the entity being checked.
    
char TempName[64];
    
    
// First, find the "*" wildcard. If it's present, we truncate the search limit.
    
int StringLimit StrContains(Name"*");
    
    
// If no match is found, reset to the entire length, to include the terminating NULL.
    // There's a sanity check, in case the entity name is malformed.
    
if (StringLimit 0)
        
StringLimit = (strlen(Name) < 64) ? strlen(Name) + 64;
    
    
// Go through the entries from the start until the limit is reached.
    
for (int i Start 1MaxEntities i++)
    {
        
// If the entity is invalid, skip to the next entity.
        
if (!IsValidEntity(i))
            continue;
        
        
// Get the entity's name to compare.
        
GetEntPropString(iProp_Data"m_iName"TempName64);
        
        
// We use strncmp since it allows to limit the length of the search,
        // in case the "*" is present.
        
if (strncmp(NameTempNameStringLimitfalse) == 0)
            
// We have a match. Stop processing and return the match.
            
return i;
    }
    
    
// No match. Return the invalid reference.
    
return INVALID_ENT_REFERENCE;

I tried to manually start the elevator triggers with this plugin
still does not go. what could be the problem?

Last edited by Gold Fish; 02-23-2021 at 04:55.
Gold Fish is offline
Gold Fish
Senior Member
Join Date: Mar 2020
Old 02-23-2021 , 05:01   Re: Unlock elevator trigger
Reply With Quote #2

to unblock the button I also use this plugin trigger.sp
wat such a command
PHP Code:
!trigger elevator_button unlock 
Gold Fish is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 02-23-2021 , 05:32   Re: Unlock elevator trigger
Reply With Quote #3

Quote:
Originally Posted by Gold Fish View Post
I tried to manually start the elevator triggers with this plugin
still does not go. what could be the problem?
The plugin still works for c8m4 so I don't know what's wrong. Look at the plugin and the elevator name, or use Stripper:Source to dump the maps entity properties.
__________________
Silvers is offline
Gold Fish
Senior Member
Join Date: Mar 2020
Old 02-23-2021 , 05:43   Re: Unlock elevator trigger
Reply With Quote #4

Quote:
Originally Posted by Silvers View Post
The plugin still works for c8m4 so I don't know what's wrong. Look at the plugin and the elevator name, or use Stripper:Source to dump the maps entity properties.
https://drive.google.com/file/d/19Ay...ew?usp=sharing
Gold Fish is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 02-23-2021 , 08:53   Re: Unlock elevator trigger
Reply With Quote #5

You should attach the .txt file in the post. Your sharing is requesting access.

Btw this entity on c8m4 has a trigger multiple that locks it again if not everybody is inside the elevator.

PHP Code:
{
"model" "*40"
"wait" "1"
"StartDisabled" "0"
"spawnflags" "1"
"origin" "13432 15273.8 484.54"
"entireteam" "2"
"allowincap" "1"
"classname" "trigger_multiple"
"hammerid" "1199298"
"OnEntireTeamStartTouch" "elevator_button,Unlock,,0,-1"
"OnEntireTeamEndTouch" "elevator_button,Lock,,0,-1"

Try adding a filter to your c8m4_interior.cfg file inside stripper/maps folder.

PHP Code:
filter:
{
"classname" "trigger_multiple"
"hammerid" "1199298"

Attached Files
File Type: cfg c8m4_interior.cfg (63 Bytes, 44 views)
__________________

Last edited by Marttt; 02-23-2021 at 08:54.
Marttt is offline
Gold Fish
Senior Member
Join Date: Mar 2020
Old 02-23-2021 , 10:40   Re: Unlock elevator trigger
Reply With Quote #6

Marttt, Thanks for the answer, I'm trying to make sure that after trying to press the elevator buttons, a timer is activated, after which the button will be unlocked and the elevator will go. If you remove the lock through the stripper, it will be difficult to check that all players are in the elevator, I unlock the elevator button with the command !trigger elevator_button unlock (manual method) (
plugin for managing triggers
) and sometimes this part of the elevator doors do not close to the end and the elevator does not go anywhere, no activations triggers no longer help to move the elevator, I do not yet understand what is breaking the elevator, because I just unlock the panel. Other plugins don't seem to conflict.
Also, sometimes the problem occurs with other elevators and only when there are a lot of people on the server

sorry for my English

Last edited by Gold Fish; 02-23-2021 at 10:45.
Gold Fish is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 02-23-2021 , 10:52   Re: Unlock elevator trigger
Reply With Quote #7

Well, seem that you made some custom event on this button, maybe you should describe it more.
At first, I thought that you were just trying to unlock the button.
__________________
Marttt is offline
Gold Fish
Senior Member
Join Date: Mar 2020
Old 02-23-2021 , 15:18   Re: Unlock elevator trigger
Reply With Quote #8

This plug-in starts a timer for 10 seconds after activating the elevator button, then the button will be unlocked, Sometimes it didn’t work and the elevator didn’t move and players get stuck on the map
Attached Files
File Type: sp Get Plugin or Get Source (triggersUnlock.sp - 83 views - 9.8 KB)
Gold Fish is offline
Gold Fish
Senior Member
Join Date: Mar 2020
Old 02-27-2021 , 16:06   Re: Unlock elevator trigger
Reply With Quote #9

Quote:
Originally Posted by Silvers View Post
The plugin still works for c8m4 so I don't know what's wrong. Look at the plugin and the elevator name, or use Stripper:Source to dump the maps entity properties.
it seems the problem was in this plugin The New Weaponefibrillator
, most of the bugs occur when using the defibrillator, maybe that code somehow harms the triggers?


Could it be due to misuse of the hook? in SM1.10?

PHP Code:
        SDKUnhook(clientSDKHook_PreThink ClientThink);
        
SDKHook(clientSDKHook_PreThink ClientThink); 

Maybe these hooks are very dangerous for triggers and should be unhooked on map with triggers?

Last edited by Gold Fish; 02-27-2021 at 16:10.
Gold Fish is offline
Gold Fish
Senior Member
Join Date: Mar 2020
Old 03-03-2021 , 05:59   Re: [Solved] Unlock elevator trigger
Reply With Quote #10

Found the reasons why the elevators stopped functioning, thanks to honorcode23
https://forums.alliedmods.net/showpo...8&postcount=15

Last edited by Gold Fish; 03-03-2021 at 06:02.
Gold Fish 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 07:01.


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