Skip to content

[Feature Request] Block Zone #1169

@Uronic

Description

@Uronic

A zone which blocks the player. This zone type exists in Influx Timer.

This is the code from influx:

        default :
        {
            float spd = GetEntitySpeed( client ) * 0.5;
            
            if ( spd < 300.0 )
            {
                spd = 300.0;
            }
            
            decl Float:temp[3], Float:temp2[3];
            GetClientAbsOrigin( client, temp );
            GetEntityOrigin( ent, temp2 );
            
            float dist = GetVectorDistance( temp, temp2, false );
            for ( int i = 0; i < 3; i++ )
            {
                temp[i] = ( (temp[i] - temp2[i]) / dist ) * spd;
            }
            
            GetClientEyeAngles( client, temp2 );
            temp2[0] = GetRandomFloat( -89.0, 89.0 );
            temp2[1] = GetRandomFloat( -180.0, 180.0 );
            
            TeleportEntity( client, NULL_VECTOR, temp2, temp );
        }
    }
    
    if ( print && GetEngineTime() > g_flNextMsg[client] )
    {
        PrintCenterText( client, "You shouldn't be here!" );
        
        g_flNextMsg[client] = GetEngineTime() + 1.0;
    }

https://github.com/InfluxTimer/sm-timer/blob/d3e055ecf4d25cbb08ffd531215a7be49e641a6a/addons/sourcemod/scripting/influx_zones_block.sp#L536-L568

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions