Raised This Month: $ Target: $400
 0% 

simple way to detect player stuck on spawn?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
zXCaptainXz
Member
Join Date: May 2017
Old 10-20-2022 , 17:14   Re: simple way to detect player stuck on spawn?
Reply With Quote #7

Quote:
Originally Posted by loki_himself View Post
i tired that hull code from above and removed "&& !get_user_noclip(player) && !(pev(player,pev_solid) & SOLID_NOT)". i use resemiclip and when a player spawns on a teammate, he is considered stuck although he is not due to the semiclip. is that part above relevant for that?

It's because of the error Natsheh pointed out, it should be &&(pev(player,pev_solid)!=SOLID_NOT)

Anyway, I tried this code and it removed a faulty spawn successfully, give it a shot

PHP Code:
#include <amxmodx>
#include <engine>

public plugin_init()
{
    
register_plugin("Bad Spawn Remover""1.0""zXCaptainXz")
    new 
ent = -1
    
new Float:origin[3]
    while((
ent find_ent_by_class(ent"info_player_start")))
    {
        
entity_get_vector(entEV_VEC_originorigin)
        if(
trace_hull(originHULL_HUMAN)&3)
        {
            
remove_entity(ent);
        }
    }
    
ent = -1
    
while((ent find_ent_by_class(ent"info_player_deathmatch")))
    {
        
entity_get_vector(entEV_VEC_originorigin)
        if(
trace_hull(originHULL_HUMAN)&3)
        {
            
remove_entity(ent);
        }
    }

zXCaptainXz is offline
 


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 20:05.


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