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

[CS:GO] Panorama Check (1.0, 7-8-2018)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Charles_
Junior Member
Join Date: Jul 2015
Location: Connecticut, USA
Plugin ID:
6190
Plugin Version:
1.0
Plugin Category:
Technical/Development
Plugin Game:
Counter-Strike: GO
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    This plugin allows you to detect if a client is using the CS:GO panorama UI and is designed to be used as a dependency for other plugins.
    Old 07-08-2018 , 04:49   [CS:GO] Panorama Check (1.0, 7-8-2018)
    Reply With Quote #1

    Panorama Check

    This plugin allows you to detect if a client is using the CS:GO panorama UI and is designed to be used as a dependency for other plugins.

    I based this code off the snippet I posted here. Hopeful this helps to ease implementation of this into existing plugins.

    This plugin isn't heavily tested and is made as a temporary solution to detecting which CS:GO UI an individual player is using until valve completely migrates to the new panorama UI.

    This allows you to include panorama_check in your plugins that need such detection and then use the included native to check if a client uses the panorama UI.

    Feel free to report any issues you find in a reply below or add me on steam.

    If you add me on steam, please comment why or it could be a very long time before I add you.
    http://steamcommunity.com/id/hypnos_/
    Attached Files
    File Type: inc panorama_check.inc (633 Bytes, 355 views)
    File Type: sp Get Plugin or Get Source (panorama_check.sp - 444 views - 1.4 KB)
    File Type: smx panorama_check.smx (4.2 KB, 407 views)

    Last edited by Charles_; 07-08-2018 at 04:56.
    Charles_ is offline
    Bara
    AlliedModders Donor
    Join Date: Apr 2012
    Location: Germany
    Old 07-08-2018 , 04:56   Re: [CS:GO] Panorama Check (1.0, 7-8-2018)
    Reply With Quote #2

    Thanks! But I've already add your snippet into TTT but useful for other mods/servers/plugins.
    __________________
    Discord (Bara#5006) | My Plugins (GitHub)
    You like my work? Support is not a crime.
    Bara is offline
    Kxnrl
    AlliedModders Donor
    Join Date: May 2015
    Old 07-08-2018 , 06:02   Re: [CS:GO] Panorama Check (1.0, 7-8-2018)
    Reply With Quote #3

    I found a cvar list.

    https://github.com/neko-pm/panorama_...ster/README.md
    __________________
    Kxnrl is offline
    mug1wara
    AlliedModders Donor
    Join Date: Jun 2018
    Old 07-08-2018 , 09:19   Re: [CS:GO] Panorama Check (1.0, 7-8-2018)
    Reply With Quote #4

    sweeet, I was going to do this aswell but nvm then xd. nice job!
    mug1wara is offline
    Franc1sco
    Veteran Member
    Join Date: Oct 2010
    Location: Spain (Madrid)
    Old 07-08-2018 , 11:02   Re: [CS:GO] Panorama Check (1.0, 7-8-2018)
    Reply With Quote #5

    Suggestions:

    -Add this onpluginstart for late load
    PHP Code:
    for (new 1<= MaxClientsi++)
            if (
    IsClientInGame(i) && !IsFakeClient(i))
                
    OnClientPostAdminCheck(i); 
    -Make a third-party plugin for check who have panorame enabled (just for curiosity).
    PHP Code:
    #pragma semicolon 1

    #include <sourcemod>
    #include <panorama_check>

    public void OnPluginStart()
    {
        
    RegConsoleCmd("sm_checkpanorama"Command_CheckPanorama"Show on console who players have panorama enabled");
    }

    public 
    Action Command_CheckPanorama(int clientint args)
    {
        for (new 
    1<= MaxClientsi++)
        {
            if (
    IsClientInGame(i) && !IsFakeClient(i))
            {
                if(
    UseClientPanorama(i))
                {
                    
    PrintToConsole(client"%N USE panorama"i);
                }
                else
                {
                    
    PrintToConsole(client"%N DONT USE panorama"i);
                }
            }
        }
                    
        return 
    Plugin_Handled;

    __________________
    Veteran Coder -> Activity channel
    Coding on CS2 and taking paid and free jobs.

    Contact: Steam, Telegram or discord ( franug ).

    You like my work? +Rep in my steam profile comments or donate.


    Last edited by Franc1sco; 07-08-2018 at 14:27.
    Franc1sco is offline
    Send a message via MSN to Franc1sco
    hmmmmm
    Great Tester of Whatever
    Join Date: Mar 2017
    Location: ...
    Old 07-08-2018 , 12:56   Re: [CS:GO] Panorama Check (1.0, 7-8-2018)
    Reply With Quote #6

    Quote:
    Originally Posted by Franc1sco View Post
    PHP Code:
    public Action Command_CheckPanorama(int clientint args)
    {
        for (new 
    1<= MaxClientsi++)
            if (
    IsClientInGame(i) && !IsFakeClient(i))
                if(
    UseClientPanorama(i))
                    
    PrintToConsole(client"%N USE panorama"i);
                else
                    
    PrintToConsole(client"%N DONT USE panorama"i);
                    
        return 
    Plugin_Handled;

    You should use curly brackets to encapsulate code, I don't think that will get evaluated the way you think it will.

    Last edited by hmmmmm; 07-08-2018 at 13:00.
    hmmmmm is offline
    Franc1sco
    Veteran Member
    Join Date: Oct 2010
    Location: Spain (Madrid)
    Old 07-08-2018 , 13:28   Re: [CS:GO] Panorama Check (1.0, 7-8-2018)
    Reply With Quote #7

    Quote:
    Originally Posted by hmmmmm View Post
    You should use curly brackets to encapsulate code, I don't think that will get evaluated the way you think it will.
    Brackets not needed for just 1 line of code, but you can add it too, it is a matter of taste. Anyway in my opinion, it seems more cleaner without brackets.


    About late load, clients could give false negatives to people ingame when the plugins is re/loaded if he dont have a code like I posted.
    __________________
    Veteran Coder -> Activity channel
    Coding on CS2 and taking paid and free jobs.

    Contact: Steam, Telegram or discord ( franug ).

    You like my work? +Rep in my steam profile comments or donate.


    Last edited by Franc1sco; 07-08-2018 at 13:30.
    Franc1sco is offline
    Send a message via MSN to Franc1sco
    micapat
    Veteran Member
    Join Date: Feb 2010
    Location: Nyuu, nyuu (France).
    Old 07-08-2018 , 14:22   Re: [CS:GO] Panorama Check (1.0, 7-8-2018)
    Reply With Quote #8

    Quote:
    Originally Posted by Franc1sco View Post
    Brackets not needed for just 1 line of code, but you can add it too, it is a matter of taste. Anyway in my opinion, it seems more cleaner without brackets.


    About late load, clients could give false negatives to people ingame when the plugins is re/loaded if he dont have a code like I posted.
    The "else" in your code will not be executed like you think.
    __________________
    micapat is offline
    Franc1sco
    Veteran Member
    Join Date: Oct 2010
    Location: Spain (Madrid)
    Old 07-08-2018 , 14:23   Re: [CS:GO] Panorama Check (1.0, 7-8-2018)
    Reply With Quote #9

    Quote:
    Originally Posted by micapat View Post
    The "else" in your code will not be executed like you think.
    No idea, I am not tested the code yet. But I added the brackets anyway.
    __________________
    Veteran Coder -> Activity channel
    Coding on CS2 and taking paid and free jobs.

    Contact: Steam, Telegram or discord ( franug ).

    You like my work? +Rep in my steam profile comments or donate.


    Last edited by Franc1sco; 07-08-2018 at 14:27.
    Franc1sco is offline
    Send a message via MSN to Franc1sco
    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 21:52.


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