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

[INS] Insurgency beta 2 Library - GetClientSquad


Post New Thread Reply   
 
Thread Tools Display Modes
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 - 508 views - 7.5 KB)
    File Type: sp Get Plugin or Get Source (ins_lib_getclientsquad v1_1_0.sp - 480 views - 10.7 KB)
    File Type: txt ins_netprops_CPlayTeam.txt (13.7 KB, 172 views)
    File Type: sp Get Plugin or Get Source (ins_lib_getclientsquad.sp - 527 views - 10.9 KB)
    File Type: inc ins_lib_getclientsquad v1_2_0.inc (1.7 KB, 159 views)
    File Type: inc ins_lib_getclientsquad.inc (1.7 KB, 161 views)
    File Type: sp Get Plugin or Get Source (ins_test_getclientsquad v1_0_0.sp - 164 views - 5.5 KB)
    File Type: sp Get Plugin or Get Source (ins_test_getclientsquad.sp - 107 views - 5.5 KB)
    File Type: sp Get Plugin or Get Source (ins_lib_getclientsquad v1_2_0.sp - 482 views - 10.9 KB)
    __________________

    Last edited by 166_MMX; 10-12-2009 at 05:08.
    166_MMX is offline
    R3M*
    Member
    Join Date: May 2009
    Location: Germany
    Old 10-10-2009 , 15:07   Re: [INS] Insurgency beta 2 Library - GetClientSquad
    Reply With Quote #2

    Awesome!
    R3M* is offline
    166_MMX
    Junior Member
    Join Date: Jan 2009
    Location: HE, Germany
    Old 10-11-2009 , 10:00   Re: [INS] Insurgency beta 2 Library - GetClientSquad
    Reply With Quote #3

    released v1.1.0
    __________________
    166_MMX is offline
    psychonic

    BAFFLED
    Join Date: May 2008
    Old 10-11-2009 , 10:36   Re: [INS] Insurgency beta 2 Library - GetClientSquad
    Reply With Quote #4

    Insurgency teams are not constant. Team indexes are per map in Insurgency. For example, 1 & 2 are switched (from what your constants have) on ins_karam and ins_baghdad.
    psychonic is offline
    166_MMX
    Junior Member
    Join Date: Jan 2009
    Location: HE, Germany
    Old 10-11-2009 , 10:42   Re: [INS] Insurgency beta 2 Library - GetClientSquad
    Reply With Quote #5

    Quote:
    Originally Posted by psychonic View Post
    Insurgency teams are not constant. Team indexes are per map in Insurgency. For example, 1 & 2 are switched (from what your constants have) on ins_karam and ins_baghdad.
    You must be kidding me, I'll check that. Quite shocking news .... Is there anything in that mod that follows a standard? *sigh*

    Thanks for bringing this to my attention, though
    __________________
    166_MMX is offline
    Kigen
    BANNED
    Join Date: Feb 2008
    Old 10-12-2009 , 21:14   Re: [INS] Insurgency beta 2 Library - GetClientSquad
    Reply With Quote #6

    Insurgency is a weird can of worms. Good luck.

    Also, you should have posted your stuff in the Snippets section.

    http://forums.alliedmods.net/forumdisplay.php?f=112

    Basically making it a included file when needed by another developer.
    Kigen is offline
    bouncer
    Veteran Member
    Join Date: Apr 2009
    Old 10-14-2009 , 22:34   Re: [INS] Insurgency beta 2 Library - GetClientSquad
    Reply With Quote #7

    Noobish question, what exactly does this do?
    bouncer is offline
    Frus
    Senior Member
    Join Date: Aug 2009
    Old 10-15-2009 , 01:12   Re: [INS] Insurgency beta 2 Library - GetClientSquad
    Reply With Quote #8

    Quote:
    Originally Posted by bouncer View Post
    Noobish question, what exactly does this do?
    Nothing.

    It's for plugin developers to use in their plugins. Admittedly it should have been in the snippets section.
    Frus 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 00:59.


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