Raised This Month: $32 Target: $400
 8% 

[L4D] Espawn Preventor


Post New Thread Reply   
 
Thread Tools Display Modes
Author
InspectorSpacetime
New Member
Join Date: Apr 2012
Plugin ID:
2885
Plugin Version:
1.0.0.0
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Plugin to instantly kill an infected that trys to espawn
    Old 04-06-2012 , 11:37   [L4D] Espawn Preventor
    Reply With Quote #1

    Description
    Plugin instantly kills an infected that try's to use espawning exploit ( Left Click + E , to spawn in the middle of a survivor).

    CVARS
    None

    ChangeLog

    * 2012-04-06 (v1.0.0.0)
    Initial Release

    Plans
    None
    Attached Files
    File Type: sp Get Plugin or Get Source (EspawnDisable.sp - 1358 views - 1.7 KB)

    Last edited by InspectorSpacetime; 04-06-2012 at 11:38.
    InspectorSpacetime is offline
    jamalsheref2
    Senior Member
    Join Date: May 2017
    Old 05-14-2020 , 16:01   Re: [L4D] Espawn Preventor
    Reply With Quote #2

    don't work
    jamalsheref2 is offline
    finishlast
    Senior Member
    Join Date: Nov 2018
    Location: In Reno with the vitamin
    Old 08-17-2020 , 12:50   Re: [L4D] Espawn Preventor
    Reply With Quote #3

    It works sometimes, sometimes not. I guess the check is not instant, so the vectors might be out of sync a bit sometimes.

    MB allow the check to be like +-50 in every direction for the check, so if you not spawn in the exact position but very very very close you can take it as an espawn positiv.

    This is the output:

    I Am At: 6222.557128, -503.701965, 721.703918
    Client: 2, is at: 6845.089355, -575.072143, 768.031250
    Client: 3, is at: 6806.115722, -569.540466, 768.031250
    Client: 4, is at: 6763.621093, -594.627502, 768.031250
    Client: 5, is at: 6249.055664, -507.293609, 721.847961

    I changed your check to this:

    if( (clientsVec[i][0] <= clientVec[0]+50 && clientsVec[i][0] >= clientVec[0]-50) && (clientsVec[i][1] <= clientVec[1]+50 && clientsVec[i][1] >= clientVec[1]-50) && (clientsVec[i][2] <= clientVec[2]+50 && clientsVec[i][2] >= clientVec[2]-50) )



    I Am At: 5222.530273, -343.272644, 672.031250
    Client: 2, is at: 6783.795410, -569.687500, 768.031250
    Client: 3, is at: 6763.817382, -599.589843, 768.031250
    Client: 4, is at: 6787.042480, -566.029235, 768.031250
    Client: 5, is at: 5225.431152, -324.830566, 672.031250
    [SM] Playerxyz tried to espawn, and was killed for it.

    It seems more reliable.
    Attached Files
    File Type: sp Get Plugin or Get Source (EspawnDisable.sp - 297 views - 1.8 KB)
    __________________

    Last edited by finishlast; 08-17-2020 at 13:52.
    finishlast is offline
    Slaven555
    Member
    Join Date: Jul 2018
    Old 08-18-2020 , 00:28   Re: [L4D] Espawn Preventor
    Reply With Quote #4

    Quote:
    Originally Posted by finishlast View Post
    It works sometimes, sometimes not. I guess the check is not instant, so the vectors might be out of sync a bit sometimes.

    MB allow the check to be like +-50 in every direction for the check, so if you not spawn in the exact position but very very very close you can take it as an espawn positiv.

    This is the output:

    I Am At: 6222.557128, -503.701965, 721.703918
    Client: 2, is at: 6845.089355, -575.072143, 768.031250
    Client: 3, is at: 6806.115722, -569.540466, 768.031250
    Client: 4, is at: 6763.621093, -594.627502, 768.031250
    Client: 5, is at: 6249.055664, -507.293609, 721.847961

    I changed your check to this:

    if( (clientsVec[i][0] <= clientVec[0]+50 && clientsVec[i][0] >= clientVec[0]-50) && (clientsVec[i][1] <= clientVec[1]+50 && clientsVec[i][1] >= clientVec[1]-50) && (clientsVec[i][2] <= clientVec[2]+50 && clientsVec[i][2] >= clientVec[2]-50) )



    I Am At: 5222.530273, -343.272644, 672.031250
    Client: 2, is at: 6783.795410, -569.687500, 768.031250
    Client: 3, is at: 6763.817382, -599.589843, 768.031250
    Client: 4, is at: 6787.042480, -566.029235, 768.031250
    Client: 5, is at: 5225.431152, -324.830566, 672.031250
    [SM] Playerxyz tried to espawn, and was killed for it.

    It seems more reliable.
    I've checked and can still occasionally respawn next to a survivor
    Slaven555 is offline
    finishlast
    Senior Member
    Join Date: Nov 2018
    Location: In Reno with the vitamin
    Old 08-18-2020 , 01:32   Re: [L4D] Espawn Preventor
    Reply With Quote #5

    Maybe extend the 50 to 60 etc.and try until it slays all attempts. 100 seemed to work, but that is a lot.

    Too high will break stuff again on some servers where you are allowed to spawn near or behind the pole in the gasstation level or the bricks in sacrafice.

    This way to detect espawn is not accurate.

    If it is possible to detect what keys are bound to use (e) and lmc, mb check for them on Player spawn instead, that could work.

    Should then check ofc for whatever keys are bound to that function.

    If pressed espawn if not then not mb.
    __________________
    finishlast is offline
    Slaven555
    Member
    Join Date: Jul 2018
    Old 08-18-2020 , 04:53   Re: [L4D] Espawn Preventor
    Reply With Quote #6

    Quote:
    Originally Posted by finishlast View Post
    Maybe extend the 50 to 60 etc.and try until it slays all attempts. 100 seemed to work, but that is a lot.

    Too high will break stuff again on some servers where you are allowed to spawn near or behind the pole in the gasstation level or the bricks in sacrafice.

    This way to detect espawn is not accurate.

    If it is possible to detect what keys are bound to use (e) and lmc, mb check for them on Player spawn instead, that could work.

    Should then check ofc for whatever keys are bound to that function.

    If pressed espawn if not then not mb.
    I tried to remake this plugin https://forums.alliedmods.net/showthread.php?p=868638 but can't find how to track the button (E). Then I redid the plugin. I have disabled the use of the (E) button in ghost mode.
    Slaven555 is offline
    finishlast
    Senior Member
    Join Date: Nov 2018
    Location: In Reno with the vitamin
    Old 08-18-2020 , 10:33   Re: [L4D] Espawn Preventor
    Reply With Quote #7

    This seems to not work for me, I can still espawn.

    E is on return key and lmb on lmb.

    Tested on l4d1.

    Output only 1 in chat, so I'm not running into the button check for some reason but am succesfully espawned.

    PHP Code:
        if (IsValidClient(client) && IsClientInGame(client) && !IsFakeClient(client) && GetClientTeam(client) == 3)
        {
        
    PrintToChatAll("1");

            if (
    GetEntProp(clientProp_Data"m_afButtonPressed") & IN_USE)
            {
                
    PrintToChatAll("2");
                
    int iTarget = -1;
                
    iTarget GetClosestTarget(client"player"50);

                if (
    IsValidClient(iTarget) && IsClientInGame(iTarget) && GetClientTeam(iTarget) == 2)
                {
                    
    PrintToChatAll("3");
                    
    ForcePlayerSuicide(client);
                    
    Format(outputsizeof(output), "[SM] %N tried to espawn and was killed for it."client);
                    
    PrintToChatAll(output);
                }
            }
        }

    __________________

    Last edited by finishlast; 08-18-2020 at 10:52.
    finishlast is offline
    MasterMind420
    BANNED
    Join Date: Nov 2010
    Old 08-18-2020 , 10:50   Re: [L4D] Espawn Preventor
    Reply With Quote #8

    Quote:
    Originally Posted by finishlast View Post
    This seems to not work for me, I can still espawn.

    E is on return key and lmb on lmb.

    Tested on l4d1.

    Output only 1 in Chat, so I'm not running into the button check for some reason but am succesfully espawned.



    if (IsValidClient(client) && IsClientInGame(client) && !IsFakeClient(client) && GetClientTeam(client) == 3)
    {
    PrintToChatAll("1");

    if (GetEntProp(client, Prop_Data, "m_afButtonPressed") & IN_USE)
    {
    PrintToChatAll("2");
    int iTarget = -1;
    iTarget = GetClosestTarget(client, "player", 50);

    if (IsValidClient(iTarget) && IsClientInGame(iTarget) && GetClientTeam(iTarget) == 2)
    {
    PrintToChatAll("3");
    ForcePlayerSuicide(client);
    Format(output, sizeof(output), "[SM] %N tried to espawn and was killed for it.", client);
    PrintToChatAll(output);
    }
    }
    }
    }
    I suspect the button check is the problem in the player_spawn event, it's happening after the fact. I removed the button check. Let me know if that works. If it does, I have a few other methods to get player spawns other than using the event that should allow properly detecting the button press. This plugin can prob do without a button check but ideally it's good practice to have it.
    Attached Files
    File Type: sp Get Plugin or Get Source (EspawnDisable.sp - 234 views - 1.9 KB)

    Last edited by MasterMind420; 08-18-2020 at 10:51.
    MasterMind420 is offline
    finishlast
    Senior Member
    Join Date: Nov 2018
    Location: In Reno with the vitamin
    Old 08-18-2020 , 10:55   Re: [L4D] Espawn Preventor
    Reply With Quote #9

    I tried it 5 times and it killed me 5 times.
    Even running and then espawn gets me killed now.

    I have to check if sitting behind the pole at gas station level gets me killed now or the bricks block at sacrifice.

    Sadly no players atm for testing.
    __________________

    Last edited by finishlast; 08-18-2020 at 11:01.
    finishlast is offline
    Slaven555
    Member
    Join Date: Jul 2018
    Old 08-18-2020 , 14:54   Re: [L4D] Espawn Preventor
    Reply With Quote #10

    Quote:
    Originally Posted by MasterMind420 View Post
    I suspect the button check is the problem in the player_spawn event, it's happening after the fact. I removed the button check. Let me know if that works. If it does, I have a few other methods to get player spawns other than using the event that should allow properly detecting the button press. This plugin can prob do without a button check but ideally it's good practice to have it.
    Did not work. I can still respawn next to a survivor and attack them.
    Slaven555 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 09:14.


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