AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   is user stuck check (https://forums.alliedmods.net/showthread.php?t=83035)

whosyourdaddy 01-03-2009 05:54

is user stuck check
 
is there a way to do a check and see if the location i wanna set some1 will get them stuck eather in another player or wall or something?

whosyourdaddy 01-03-2009 16:12

Re: is user stuck check
 
why am i getting a tag mismatch on this
Code:

stock bool:is_user_stuck(id)
{
  static Float:origin[3]
  new tr = 0;
  pev(id, pev_origin, origin)
  engfunc(EngFunc_TraceHull, origin, origin, IGNORE_MONSTERS, pev(id,pev_flags) & FL_DUCKING ? HULL_HEAD : HULL_HUMAN, 0, tr)
  if(!get_tr2(tr,TR_StartSolid) && !get_tr2(tr,TR_AllSolid) && get_tr2(tr,TR_InOpen))
      return false;
  return true;
}

line
Code:

if(!get_tr2(tr,TR_StartSolid) && !get_tr2(tr,TR_AllSolid) && get_tr2(tr,TR_InOpen))

Emp` 01-03-2009 16:45

Re: is user stuck check
 
most likely you are including engine and fakemeta (both have TR_* defines)

Try:
Code:

if(!get_tr2(tr,TraceResult:TR_StartSolid) && !get_tr2(tr,TraceResult:TR_AllSolid) && get_tr2(tr,TraceResult:TR_InOpen))

whosyourdaddy 01-03-2009 18:14

Re: is user stuck check
 
thnks no more compiler error


All times are GMT -4. The time now is 09:06.

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