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

Bad Spawn Preventer that works?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ark_Procession
Senior Member
Join Date: Jun 2020
Location: Argentina
Old 04-10-2021 , 23:08   Bad Spawn Preventer that works?
Reply With Quote #1

Hi all

Anyone has a working bad spawn preventer?


https://forums.alliedmods.net/showthread.php?t=114857
https://forums.alliedmods.net/showthread.php?t=102903

This two doesn't work anymore.
Ark_Procession is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-10-2021 , 23:13   Re: Bad Spawn Preventer that works?
Reply With Quote #2

Have you considered just fixing the map instead? It's a better solution in the end.
__________________
fysiks is offline
Ark_Procession
Senior Member
Join Date: Jun 2020
Location: Argentina
Old 04-10-2021 , 23:20   Re: Bad Spawn Preventer that works?
Reply With Quote #3

Thanks for the quick answer!

I considered it yes. thats why i use in all my maps the spawn editor... and it has a safe distance you can put but players keep dying anyway.
Ark_Procession is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 04-11-2021 , 05:57   Re: Bad Spawn Preventer that works?
Reply With Quote #4

Quote:
Originally Posted by Ark_Procession View Post
Thanks for the quick answer!

I considered it yes. thats why i use in all my maps the spawn editor... and it has a safe distance you can put but players keep dying anyway.
I updated the approved 'spawn protection script'. That will cut down on spawn deaths from over-stacking.
__________________
DJEarthQuake is offline
Ark_Procession
Senior Member
Join Date: Jun 2020
Location: Argentina
Old 04-11-2021 , 09:23   Re: Bad Spawn Preventer that works?
Reply With Quote #5

Quote:
Originally Posted by DJEarthQuake View Post
I updated the approved 'spawn protection script'. That will cut down on spawn deaths from over-stacking.
Thanks man! i tested it and they still die at the same "rate" as without the plugin. I'm using this to make spawns:

https://forums.alliedmods.net/showthread.php?p=371317

It should be safe if i respect the green line but when i add 30 bots for test, some of them will die anyway.
Ark_Procession is offline
tarsisd2
Veteran Member
Join Date: Feb 2016
Location: brazil
Old 04-12-2021 , 04:59   Re: Bad Spawn Preventer that works?
Reply With Quote #6

which maps are you using? is it de_ maps or some other mod? in my servers i never use spawn editor or such plugins as all of my maps are over 40 spawn slots, if you want i can give some maps that are giving you trouble with more spawn if it is normal maps
tarsisd2 is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 04-12-2021 , 08:38   Re: Bad Spawn Preventer that works?
Reply With Quote #7

Quote:
Originally Posted by Ark_Procession View Post
Thanks man! i tested it and they still die at the same "rate" as without the plugin. I'm using this to make spawns:

https://forums.alliedmods.net/showthread.php?p=371317

It should be safe if i respect the green line but when i add 30 bots for test, some of them will die anyway.
Set the CVAR to 60 until you use the Spawn Editor.
__________________
DJEarthQuake is offline
Ark_Procession
Senior Member
Join Date: Jun 2020
Location: Argentina
Old 04-12-2021 , 21:24   Re: Bad Spawn Preventer that works?
Reply With Quote #8

Quote:
Originally Posted by tarsisd2 View Post
which maps are you using? is it de_ maps or some other mod? in my servers i never use spawn editor or such plugins as all of my maps are over 40 spawn slots, if you want i can give some maps that are giving you trouble with more spawn if it is normal maps
Hi! i use mostly vanilla maps and custom like de_emir or de_alexandra

my problem is with small maps mostly, like fy_iceworld2k if the spawn editor checks green in distance, they shouldn't be dying... but i still wanted a plugin so i made sure no one died...
I would welcome a link for more maps tho. also, how do you prevent them from not dying?
Ark_Procession is offline
Ark_Procession
Senior Member
Join Date: Jun 2020
Location: Argentina
Old 04-12-2021 , 21:25   Re: Bad Spawn Preventer that works?
Reply With Quote #9

Quote:
Originally Posted by DJEarthQuake View Post
Set the CVAR to 60 until you use the Spawn Editor.
Sorry which cvar are you talking about? and what do you mean until i use spawn editor? i already use it.
Ark_Procession is offline
tarsisd2
Veteran Member
Join Date: Feb 2016
Location: brazil
Old 04-13-2021 , 06:46   Re: Bad Spawn Preventer that works?
Reply With Quote #10

in case you use rehlds + regame i have a plugin that adds spawn near other spawn automatically, just in case

PHP Code:
#include < amxmodx >
#include < hamsandwich >
#include < fakemeta >
#include < reapi >

#pragma semicolon 1

#define TEAM_SPAWNPOINTS_COUNT            20

new boolg_bFixFirstSpawnMAX_PLAYERS ];

new 
HamHookg_HamHook_PlayerIsPlayer;

public 
plugin_init( )
{
    
register_plugin"Spawns add auto""1.0.""dev" );

    
RegisterHookChainRG_CBasePlayer_Spawn"@CBasePlayer__Spawn_Pre"false );
    
RegisterHookChainRG_CBasePlayer_Spawn"@CBasePlayer__Spawn_Post"true );

    
DisableHamForward( ( g_HamHook_PlayerIsPlayer RegisterHamPlayerHam_IsPlayer"@CBasePlayer__IsPlayer_Pre"false ) ) );

    
AddSpawnPoints"info_player_deathmatch" );
    
AddSpawnPoints"info_player_start" );
}

public 
client_putinserveriPlayer )
{
    
g_bFixFirstSpawniPlayer ] = true;
}

@
CBasePlayer__Spawn_PreiPlayer )
{
    new 
TeamNameiTeam get_memberiPlayerm_iTeam );

    if( 
iTeam == TEAM_TERRORIST || iTeam == TEAM_CT )
    {
        if( 
g_bFixFirstSpawniPlayer ] )
        {
            
g_bFixFirstSpawniPlayer ] = false;
            return;
        }
    }
    else
        return;

    
// Using this only for selection spawn point (prevent the bugs with a player)
    
EnableHamForwardg_HamHook_PlayerIsPlayer );
}

@
CBasePlayer__Spawn_PostiPlayer )
{
    
DisableHamForwardg_HamHook_PlayerIsPlayer );
}

// HACK: prevent the death of a player
@CBasePlayer__IsPlayer_PreiEntity )
{
    
SetHamReturnIntegerfalse );
    return 
HAM_SUPERCEDE;
}

AddSpawnPoints( const sClassname[ ] )
{
    new 
FloatvecOrigin];
    new 
FloatvecAngles];

    new 
FloatvecOriginLast];
    new 
FloatvecMidOrigin];
    new 
FloatvecMidAngles];

    new Array: 
aSpawnPoints ArrayCreate);

    new 
iSpot MaxClients;

    while( ( 
iSpot rg_find_ent_by_classiSpotsClassnametrue ) ) )
    {
        
ArrayPushCellaSpawnPointsiSpot );

        
get_entvariSpotvar_originvecOrigin );
        
get_entvariSpotvar_anglesvecAngles );

        
vecMidOrigin] += vecOrigin] - vecOriginLast];
        
vecMidOrigin] += vecOrigin] - vecOriginLast];

        
vecMidAngles] += vecAngles];
        
vecMidAngles] += vecAngles];

        
vecOriginLast] = vecOrigin];
        
vecOriginLast] = vecOrigin];
    }

    new 
iSpotsCount ArraySizeaSpawnPoints );

    if( 
iSpotsCount >= TEAM_SPAWNPOINTS_COUNT )
        return;

    new 
FloatflSpotsCount floatiSpotsCount );

    
vecMidOrigin] /= flSpotsCount;
    
vecMidOrigin] /= flSpotsCount;

    
vecMidAngles] /= flSpotsCount;
    
vecMidAngles] /= flSpotsCount;

    new 
iAllSpawns iSpotsCount;
    new 
FloatflDistance floatsqrootvecMidOrigin] * vecMidOrigin] + vecMidOrigin] * vecMidOrigin] );

    for( new 
iIndex 0iIndex ArraySizeaSpawnPoints ); iIndex++ )
    {
        
iSpot ArrayGetCellaSpawnPointsiIndex );

        
get_entvariSpotvar_originvecOrigin );

        
iSpot CreateSpawnPointsClassnamevecOriginvecMidAnglesflDistance );

        if( 
iSpot == NULLENT )
            continue;

        
ArrayPushCellaSpawnPointsiSpot );

        if( ++
iAllSpawns >= TEAM_SPAWNPOINTS_COUNT )
            break;
    }

    
ArrayDestroyaSpawnPoints );

    if( 
iAllSpawns >= TEAM_SPAWNPOINTS_COUNT )
        return;

    
server_print"FAILED: not all ^"%s^". Added %d"sClassnameTEAM_SPAWNPOINTS_COUNT iAllSpawns );
}

CreateSpawnPoint( const sClassname[ ], FloatvecOrigin], FloatvecAngles], FloatflDistance )
{
    new 
FloatvecOffset][ ] = { { -1.00.0 }, { 1.00.0 }, { 0.0, -1.0 }, { 0.01.0 }, { -1.0, -1.0 }, { 1.01.0 }, { -1.01.0 }, { 1.0, -1.0 } };

    new 
FloatflRange;
    new 
FloatflFraction;
    new 
FloatvecSelect];

    
vecSelect] = vecOrigin];

    for( new 
iDeepLevel 0jiDeepLevel <= 4iDeepLevel++ )
    {
        switch( 
iDeepLevel )
        {
            case 
0flRange flDistance;
            case 
1flRange flDistance 0.5;
            case 
2flRange flDistance 1.5;
            case 
3flRange flDistance 2.0;
            case 
4flRange flDistance 2.5;
        }

        for( 
0sizeof vecOffsetj++ )
        {
            
vecSelect] = vecOrigin] + flRange vecOffset][ ];
            
vecSelect] = vecOrigin] + flRange vecOffset][ ];

            
engfuncEngFunc_TraceLinevecOriginvecSelectDONT_IGNORE_MONSTERS, -1);

            
get_tr20TR_flFractionflFraction );

            if( 
flFraction != 1.0 )
                continue;

            
engfuncEngFunc_TraceHullvecSelectvecSelect0HULL_HUMAN, -1);

            if( 
get_tr20TR_StartSolid ) || get_tr20TR_AllSolid ) || !get_tr20TR_InOpen ) )
                continue;

            new 
iEntity rg_create_entitysClassnametrue );

            if( 
is_nullentiEntity ) )
                continue;

            
engfuncEngFunc_SetOriginiEntityvecSelect );
            
set_entvariEntityvar_anglesvecAngles );

            return 
iEntity;
        }
    }

    return 
NULLENT;

here i have a lot of maps with over 40 spawns on them, so if you use them you dont need any plugin such as spawn editor:

https://disk.yandex.com/d/cauwFLLp3PR6Bx

the files has a password, wich i sent to you by pm
tarsisd2 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:59.


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