Raised This Month: $ Target: $400
 0% 

Detect players origins


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
raizo11
BANNED
Join Date: Dec 2013
Location: https://t.me/pump_upp
Old 09-05-2019 , 07:00   Detect players origins
Reply With Quote #1

I want to detect if 2 or more players from terrorsits is close to 1 from Ct... Any ideea?

I can't think of other ways

Code:
public client_PreThink()
{ 
    static X[32], Y[32], XNum, YNum, Float:XOrigin[ 3 ], Float:YOrigin[ 3 ], Float:fDistance

    get_players(X, XNum, "ae", "TERRORIST") 
    get_players(Y, YNum, "ae", "CT") 

    pev(XNum, pev_origin, XOrigin)
    pev(YNum, pev_origin, YOrigin)

    fDistance = get_distance_f( XOrigin, YOrigin)

    if( fDistance <= 100.0)
    {
        if (XNum == 2 && YNum == 1) 
        { 
            // something
        } 
    }
}
raizo11 is offline
Send a message via ICQ to raizo11 Send a message via AIM to raizo11 Send a message via MSN to raizo11 Send a message via Yahoo to raizo11 Send a message via Skype™ to raizo11
 



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:19.


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