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