AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   User Stuck Check (https://forums.alliedmods.net/showthread.php?t=196855)

malec321 09-25-2012 22:54

User Stuck Check
 
Anyone want to help me out, I need a code that can check if a user is stuck, and if the user is stuck it does this action

Best suggested method would be with engine/fakemeta?

fysiks 09-25-2012 23:52

Re: User Stuck Check
 
There are plugins that do this already. Look at them.

Bos93 09-26-2012 00:55

Re: User Stuck Check
 
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_TraceHulloriginForiginF0, (pev(idpev_flags) & FL_DUCKING) ? HULL_HEAD HULL_HUMANid0)
    
    if (
get_tr2(0TR_StartSolid) || get_tr2(0TR_AllSolid) || !get_tr2(0TR_InOpen))
        return 
true;
    
    return 
false;




All times are GMT -4. The time now is 08:21.

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