Raised This Month: $ Target: $400
 0% 

Solved Detect spectate bot


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Point
Junior Member
Join Date: Oct 2014
Old 06-19-2019 , 16:55   Detect spectate bot
Reply With Quote #1

How can i detect a player spectating a bot?

PHP Code:
stock GetSpectatedPlayer(id)
{
    if(!
is_user_alive(id)
    && ((
<< pev(idpev_iuser1)) & ((<< 1)|(<< 2)|(<< 4))) )
    {
        new 
player pev(idpev_iuser2);
        if(
is_user_alive(player))
        {
            return 
player;
        }
    }
    
    return 
id;
}
stock bool:IsUserSpectatingPlayer(spectaterplayer)
{
    return (
GetSpectatedPlayer(spectater) == player);
}

stock bool:IsUserSpectating(id)
{
    return (
GetSpectatedPlayer(id) != id);


Last edited by Point; 06-19-2019 at 17:37.
Point is offline
 



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


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