AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   circle origin (https://forums.alliedmods.net/showthread.php?t=214037)

daniel46 04-22-2013 07:00

circle origin
 
can i some how get some place in the map in circle shape and if player stand in this place then FUNCTION?

EpicMonkey 04-22-2013 07:19

Re: circle origin
 
Engine

PHP Code:

find_ent_in_sphere(start_from_ent, const Float:origin[3], Float:radius); 


daniel46 04-22-2013 07:22

Re: circle origin
 
so i do

while( find_ent_in_sphere(start_from_ent, const origin[3], 10.0); )

yes?

and how do i check if player stand in this place?

hornet 04-22-2013 08:01

Re: circle origin
 
Try this:
Code:
is_user_in_sphere( id, Float:flOrigin[], Float:flRadius ) {     new iEnt = -1;         while( ( iEnt = engfunc( EngFunc_FindEntityInSphere, iEnt, flOrigin, flRadius ) ) )     {         if( iEnt == id )             return true;     }         return false; }

daniel46 04-22-2013 09:50

Re: circle origin
 
Quote:

Originally Posted by hornet (Post 1937582)
Try this:
Code:
is_user_in_sphere( id, Float:flOrigin[], Float:flRadius ) {     new iEnt = -1;         while( ( iEnt = engfunc( EngFunc_FindEntityInSphere, iEnt, flOrigin, flRadius ) ) )     {         if( iEnt == id )             return true;     }         return false; }

thanks working good :)


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

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