AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   getting area.. (https://forums.alliedmods.net/showthread.php?t=17989)

n0obie4life 09-13-2005 04:45

getting area..
 
i haven't posted here for a long time, lol.

anyway,

If lets say, this small box

Code:

|---------------|
|                  |
|                  |
|                  |
|                  |
|---------------|

Is a huge map. And there is this person in X.


Code:

|---------------|
| X                |
|                  |
|                  |
|                  |
|---------------|

So now X talks. And I only want people in this area to hear the message (defined as Y).


Code:

|---------------|
| XY              |
|YYY            |
|                  |
|                  |
|---------------|

The square around X. How do I do that?

v3x 09-13-2005 06:44

Code:
public myFunc(id) {     new iPlayers[32],iNum,i;     get_players(iPlayers,iNum,"ac");     for(i = 0; i <= iNum; i++)     {         new x = iPlayers[i];         if(floatround(entity_range(id,x)) <= 1000)         {             // listen         }         else         {             // don't listen         }     } }


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

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