AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to check non-player entity is stuck? (https://forums.alliedmods.net/showthread.php?t=215264)

11922911 05-05-2013 13:23

How to check non-player entity is stuck?
 
Does it work for non-player entity?
PHP Code:

// Check if a player is stuck (credits to VEN) 
stock is_player_stuck(id

    static 
Float:originF[3
    
pev(idpev_originoriginF
    
    
engfunc(EngFunc_TraceHulloriginForiginF0HULL_???, id0
    
    if (
get_tr2(0TR_StartSolid) || get_tr2(0TR_AllSolid) || !get_tr2(0TR_InOpen)) 
        return 
true
  
    return 
false


Could anyone answer me?
Thanks in advance:)

bibu 05-05-2013 13:48

Re: How to check non-player entity is stuck?
 
Try it out?


All times are GMT -4. The time now is 10:45.

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