AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   users close to reigion? (https://forums.alliedmods.net/showthread.php?t=61799)

fxfighter 10-10-2007 05:25

users close to reigion?
 
how can i cheek if a player is close to a reigion.
becase i gonna move a player to a reigion and before i do that
i wanna cheek so no one is close so they dont get stuck.

Wilson [29th ID] 10-10-2007 05:30

Re: users close to reigion?
 
You can cheek with trace_hull.

ConnorMcLeod 10-10-2007 05:36

Re: users close to reigion?
 
This tut should help you : http://forums.alliedmods.net/showthread.php?t=49829

fxfighter 10-13-2007 07:47

Re: users close to reigion?
 
is thare enything similar to trace hull in fakemeta?
thinks it quite bad just to have engine for one command.

Alka 10-13-2007 07:55

Re: users close to reigion?
 
lawl take a look in fakemeta functions...

Code:

register_forward(FM_TraceHull,...);
:wink:

fxfighter 10-13-2007 15:33

Re: users close to reigion?
 
dam but what dose hull return?
Quote:

trace_hull ( Float: origin[3] , hull, 0, 0 )

Alka 10-14-2007 04:35

Re: users close to reigion?
 
You can use this also
Code:

stock bool:Is_Hull_Vacant(const Float:Origin[3], Hull, id)
{
 new tr;
 engfunc(EngFunc_TraceHull, Origin, Origin, 0, Hull, id, tr);
 if(!get_tr2(tr, TR_StartSolid) || !get_tr2(tr, TR_AllSolid))
  return true;
 
 return false;
}

Note: "Hull = pev(index, pev_flags) & FL_DUCKING ? HULL_HEAD : HULL_HUMAN;"

if "Origin[3]" is vacant will return true, else false.


All times are GMT -4. The time now is 16:14.

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