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

[ANY] Distance Target Filters


Post New Thread Reply   
 
Thread Tools Display Modes
Mitchell
~lick~
Join Date: Mar 2010
Old 03-26-2014 , 09:52   Re: [ANY] Distance Target Filters
Reply With Quote #11

Quote:
Originally Posted by ddhoward View Post
I've gone over it in my head several dozen times; I have yet to find an instance where it does not work.
you replied really fast, i went over it, it looks like it'd work.
but with that being that way whole variable situation could change like so:
PHP Code:
public bool:FilterDistance(const String:strPattern[], Handle:hClients)
{
    new 
client lcClient;
    
    
decl Float:vecOrigin1[3];
    
decl Float:vecOrigin2[3];
    
    new 
bool:opposite;
    if(
strPattern[1] == '!'opposite true;
    
    
GetClientAbsOrigin(clientvecOrigin1);    
    for(new 
1<= MaxClientsi++)
    {
        if(
IsClientInGame(i))
        {
            
GetClientAbsOrigin(ivecOrigin2);
            if( ( 
GetVectorDistance(vecOrigin1vecOrigin2) <= distance[client] ) == !opposite 
                
PushArrayCell(hClientsi);
        }
    }
    return 
true;


Last edited by Mitchell; 03-26-2014 at 09:53.
Mitchell is offline
MafiaBoss
AlliedModders Donor
Join Date: Aug 2013
Old 03-26-2014 , 22:34   Re: [ANY] Distance Target Filters
Reply With Quote #12

Can there be a version where it doesn't target yourself?
MafiaBoss is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 04-15-2022 , 09:42   Re: [ANY] Distance Target Filters
Reply With Quote #13

4#:

sm_setdistance 0
sm_slay @!distance

// This will kill everyone.
// In this case, use: '@all'.

That's not how math works.

If @distance of 0 kills yourself, @!distance of 0 kills everyone but yourself. This means that the equivalent is @!me
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 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 17:16.


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