Raised This Month: $12 Target: $400
 3% 

Players in Radius


Post New Thread Reply   
 
Thread Tools Display Modes
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 09-04-2010 , 10:58   Re: Players in Radius
Reply With Quote #11

Red,
Code:
new tempid = -1 while( ( tempid = find_ent_in_sphere( tempid, origin, 200.0 ) ) ) {     // ... }
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
RedRobster
Veteran Member
Join Date: Apr 2010
Location: Your Closet
Old 09-04-2010 , 11:02   Re: Players in Radius
Reply With Quote #12

<3
__________________
RedRobster is offline
TheKidz
Senior Member
Join Date: May 2009
Old 09-04-2010 , 11:31   Re: Players in Radius
Reply With Quote #13

didnt worked :T
im kinda tired.. so, its possible ? :c
i will tell exacly what i had i mind:
all players got radius, if X players in the same radius then they will get 10 seconds to spare or they gonna be slaped. the number max of players in radius depends of max players in server. Possible or not ? if its possible i wish u guys tell me what i have to do, i mean helping me T_T
__________________
TheKidz is offline
TheKidz
Senior Member
Join Date: May 2009
Old 09-17-2010 , 16:21   Re: Players in Radius
Reply With Quote #14

bump
__________________
TheKidz is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 09-17-2010 , 16:37   Re: Players in Radius
Reply With Quote #15

I didn't write the whole thing for you, but this should give you a step forward:

Code:
#include < amxmodx > #include < fakemeta > CheckRadius( Float:flRadius, iMaxInRadius, iSlapPower = 0 ) {     new iPlayers[ 32 ], iNum;     get_players( iPlayers, iNum, "a" );         new Float:vecPlayerOrigins[ 32 ][ 3 ];     new bool:bSlapped[ 33 ];         for( new i = 0; i < iNum; i++ )     {         pev( iPlayers[ i ], pev_origin, vecPlayerOrigins[ i ] );     }         new iPlayersInRadius[ 32 ], iRadiusNum;         new iPlayer;         for( new i = 0, j; i < iNum; i++ )     {         iPlayer = iPlayers[ i ];                 iPlayersInRadius[ 0 ] = iPlayer;         iRadiusNum = 1;                 for( j = 0; j < iNum; j++ )         {             if( j != i )             {                 if( get_distance_f( vecPlayerOrigins[ i ], vecPlayerOrigins[ j ] ) <= flRadius )                 {                     iPlayersInRadius[ iRadiusNum++ ] = iPlayers[ j ];                 }             }         }                 if( iRadiusNum >= iMaxInRadius )         {             for( j = 0; j < iRadiusNum; j++ )             {                 iPlayer = iPlayersInRadius[ j ];                                 if( !bSlapped[ iPlayer ] )                 {                     user_slap( iPlayer, iSlapPower );                                         bSlapped[ iPlayer ] = true;                 }             }         }     } }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
TheKidz
Senior Member
Join Date: May 2009
Old 09-18-2010 , 17:41   Re: Players in Radius
Reply With Quote #16

thats exacly what i had i mind, thank you exolent ! thats why ppl luv you ;D
__________________
TheKidz is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:57.


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