PDA

View Full Version : [Solved] l4d2 safe door print


Neon123
06-28-2016, 20:35
i need a plugin I say who opens or closes the door

cravenge
06-30-2016, 02:46
Uhmmm, that would eventually lag your server if you're hosting. But I can do it for you if you want.

Neon123
06-30-2016, 21:05
could do it please ?

cravenge
07-02-2016, 19:26
Absolutely, give me time to make. I'll keep you posted until I'm done.

manhkst
07-14-2016, 05:26
I greet you from Vietnam , I won a little spare time to help you , I did not quite understand the idea you put forward, I wrote a short plugins and you can check it properly with the requirements of you do not , any feedback about it I will help you . It will save the name of open and closed at the same time file logs displayed directly on the frame of the game when players chat open or closed
:wink:

AzureStars
07-15-2016, 16:48
I greet you from Vietnam , I won a little spare time to help you , I did not quite understand the idea you put forward, I wrote a short plugins and you can check it properly with the requirements of you do not , any feedback about it I will help you . It will save the name of open and closed at the same time file logs displayed directly on the frame of the game when players chat open or closed
:wink:

Only just started test this, iv'e noticed two things so far..

1/ It spams chat for any other doors that are used. It needs to be saferoom door only.

2/ Whoever uses door it is printed into error log like this all the time, surely this is wrong?....

L 07/15/2016 - 18:32:10: [L4D2_WhoOpenCloseDoor.smx] wowa has close door
L 07/15/2016 - 18:32:21: [L4D2_WhoOpenCloseDoor.smx] Roman Reigns has close door
L 07/15/2016 - 18:32:23: [L4D2_WhoOpenCloseDoor.smx] Roman Reigns has close door
L 07/15/2016 - 18:32:28: [L4D2_WhoOpenCloseDoor.smx] ☯✩KomanDo★☯ has close door
L 07/15/2016 - 18:32:35: [L4D2_WhoOpenCloseDoor.smx] Roman Reigns has close door
L 07/15/2016 - 18:32:35: [L4D2_WhoOpenCloseDoor.smx] Roman Reigns has close door
L 07/15/2016 - 18:34:50: [L4D2_WhoOpenCloseDoor.smx] wowa has close door
L 07/15/2016 - 18:34:50: [L4D2_WhoOpenCloseDoor.smx] wowa has close door
L 07/15/2016 - 18:34:58: [L4D2_WhoOpenCloseDoor.smx] Vero has close door
L 07/15/2016 - 18:37:37: [L4D2_WhoOpenCloseDoor.smx] MigueL has close door
L 07/15/2016 - 18:37:40: [L4D2_WhoOpenCloseDoor.smx] TFGXAPEX5956 has close door
L 07/15/2016 - 18:37:45: [L4D2_WhoOpenCloseDoor.smx] TFGXAPEX5956 has close door

If you can fix 1 and 2 will be much better?
Other than this i think this is good as you can see who is open or troll saferoom door easier.

cravenge
07-16-2016, 04:00
Only just started test this, iv'e noticed two things so far..

1/ It spams chat for any other doors that are used. It needs to be saferoom door only.

2/ Whoever uses door it is printed into error log like this all the time, surely this is wrong?....

L 07/15/2016 - 18:32:10: [L4D2_WhoOpenCloseDoor.smx] wowa has close door
L 07/15/2016 - 18:32:21: [L4D2_WhoOpenCloseDoor.smx] Roman Reigns has close door
L 07/15/2016 - 18:32:23: [L4D2_WhoOpenCloseDoor.smx] Roman Reigns has close door
L 07/15/2016 - 18:32:28: [L4D2_WhoOpenCloseDoor.smx] ☯✩KomanDo★☯ has close door
L 07/15/2016 - 18:32:35: [L4D2_WhoOpenCloseDoor.smx] Roman Reigns has close door
L 07/15/2016 - 18:32:35: [L4D2_WhoOpenCloseDoor.smx] Roman Reigns has close door
L 07/15/2016 - 18:34:50: [L4D2_WhoOpenCloseDoor.smx] wowa has close door
L 07/15/2016 - 18:34:50: [L4D2_WhoOpenCloseDoor.smx] wowa has close door
L 07/15/2016 - 18:34:58: [L4D2_WhoOpenCloseDoor.smx] Vero has close door
L 07/15/2016 - 18:37:37: [L4D2_WhoOpenCloseDoor.smx] MigueL has close door
L 07/15/2016 - 18:37:40: [L4D2_WhoOpenCloseDoor.smx] TFGXAPEX5956 has close door
L 07/15/2016 - 18:37:45: [L4D2_WhoOpenCloseDoor.smx] TFGXAPEX5956 has close door

If you can fix 1 and 2 will be much better?
Other than this i think this is good as you can see who is open or troll saferoom door easier.Yup, definitely something wrong with his coding. Thanks for trying anyway, I'll just have to redo yours so the 2 bugs confirmed by AzureStars and I can be gone.

manhkst
07-16-2016, 12:34
:wink:Thanks AzureStars checked me in error , I fix the code for problems 1 and 2 , the second problem is that I actively written to the error log file because I do not understand the requirements of Neon123 should I put multiple ways to print on chat frame and saved to file error . Please get back to me about a bug or bugs of plugins . thank you

AzureStars
07-17-2016, 08:39
Thanks manhkst,

I'm not able to test this atm but i will very soon.
Not sure of Neon123 exact requirements the details were brief.
I'm sure he/she will be pleased with your plugin tho.

I know i am.
Thankyou. :up:

AzureStars
07-17-2016, 16:44
:wink:Thanks AzureStars checked me in error , I fix the code for problems 1 and 2 , the second problem is that I actively written to the error log file because I do not understand the requirements of Neon123 should I put multiple ways to print on chat frame and saved to file error . Please get back to me about a bug or bugs of plugins . thank you


Ok i tried it and it is still not right.
still we are seeing players opening other doors in chat.
Not just the saferoom door only.

:cry:

Neon123
11-07-2017, 14:12
#pragma semicolon 1
#include <sdktools>
#include <sourcemod>

public OnPluginStart()
{
HookEvent("door_open",Event_OpenDoor);
HookEvent("door_close",Event_CloseDoor);
}

public Action:Event_OpenDoor(Handle:event, const String:name[], bool:dontBroadcast)
{
new bool:safe = GetEventBool(event, "checkpoint");

if(safe)
{
new client = GetClientOfUserId(GetEventInt(event, "userid"));
if(client != 0)
{
PrintToChatAll("\x04 %N HAS OPEN THE SAFE DOOR", client);
LogMessage("%N HAS OPEN THE SAFE DOOR", client);
}
}
}

public Action:Event_CloseDoor(Handle:event, const String:name[], bool:dontBroadcast)
{
new bool:safe = GetEventBool(event, "checkpoint");

if(safe)
{
new client = GetClientOfUserId(GetEventInt(event, "userid"));
if(client != 0)
{
PrintToChatAll("\x04 %N HAS CLOSED THE SAFE DOOR", client);
LogMessage("%N HAS CLOSED THE SAFE DOOR", client);
}
}
}


thanks to manhkst and nico-op