This site is a testing version, but all data is shared with the live forum.


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

[INS] Insurgency beta 2 Library - GetClientSquad


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author
166_MMX
Junior Member
Join Date: Jan 2009
Location: HE, Germany
Plugin ID:
1216
Plugin Version:
1.2.0
Plugin Category:
Technical/Development
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Provides team, squad constants and GetClientSquad function for Insurgency beta 2
    Unapprover:
    Reason for Unapproving:
    should be in snipets
    Old 10-10-2009 , 14:17   [INS] Insurgency beta 2 Library - GetClientSquad
    Reply With Quote #1

    Important notice
    This Plugin is not functional right now due to inconsistencies of Insurgency. But I will provide an update within a few days. Sorry for the inconvenience.

    Description
    Provides team, squad constants and GetClientSquad function for Insurgency beta 2

    Console variables
    • sm_ins_lib_getclientsquad_version - Insurgency beta 2 Library GetClientSquad Version

    Public constants
    Code:
    #define INS_TEAM_NONE       0  /**< No team yet. */
    #define INS_TEAM_US         1  /**< U.S. Marines. */
    #define INS_TEAM_INS        2  /**< Insurgents. */
    #define INS_TEAM_SPECTATOR  3  /**< Spectators. */
    #define INS_TEAM_COUNT      4  /**< Number of teams. */
    
    #define INS_SQUAD_INVALID   0  /**< Invalid. */
    #define INS_SQUAD_US_1      1  /**< Squad 1. */
    #define INS_SQUAD_US_2      2  /**< Squad 2. */
    #define INS_SQUAD_INS_1     3  /**< Cell 1. */
    #define INS_SQUAD_INS_2     4  /**< Cell 2. */
    #define INS_SQUAD_COUNT     5  /**< Number of squads. */
    Public functions
    Code:
    /**
     * Retrieves the client's squad. The value will be one of these constants:
     * {INS_SQUAD_INVALID, INS_SQUAD_US_1, INS_SQUAD_US_2,
     *     INS_SQUAD_INS_1, INS_SQUAD_INS_2}
     *
     * @param   client  Client index to query
     * @return          Squad constant
     */
    public GetClientSquad(client)
    Notes
    The plugin will only load for the mod Insurgency. Reasons why it is not loading are logged to the SourceMod log file (also shown on server console).

    Thanks
    to devicenull, tsunami and many more that helped me to understand the whole Entity stuff.

    Change log
    • v1.2.0 - 2009-10-11
      • changed GetClientSquad from public to "private"
      • added Native function registration and content
      • added Include header file
    • v1.1.0 - 2009-10-11
      • fixed Missing player_team event hook
      • changed Global g_aiClientSquad variable to static
      • added Change log
      • added Plugin structure comments
      • added A couple of documentation comments
      • added INS_SQUAD_COUNT constant
      • removed sdktools include for now
    • v1.0.0 - 2009-10-10
      • Initial release
    Attached Files
    File Type: sp Get Plugin or Get Source (ins_lib_getclientsquad v1_0_0.sp - 516 views - 7.5 KB)
    File Type: sp Get Plugin or Get Source (ins_lib_getclientsquad v1_1_0.sp - 485 views - 10.7 KB)
    File Type: txt ins_netprops_CPlayTeam.txt (13.7 KB, 175 views)
    File Type: sp Get Plugin or Get Source (ins_lib_getclientsquad.sp - 533 views - 10.9 KB)
    File Type: inc ins_lib_getclientsquad v1_2_0.inc (1.7 KB, 162 views)
    File Type: inc ins_lib_getclientsquad.inc (1.7 KB, 164 views)
    File Type: sp Get Plugin or Get Source (ins_test_getclientsquad v1_0_0.sp - 166 views - 5.5 KB)
    File Type: sp Get Plugin or Get Source (ins_test_getclientsquad.sp - 109 views - 5.5 KB)
    File Type: sp Get Plugin or Get Source (ins_lib_getclientsquad v1_2_0.sp - 489 views - 10.9 KB)
    __________________

    Last edited by 166_MMX; 10-12-2009 at 05:08.
    166_MMX 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:40.


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