{"id":30556149,"url":"https://github.com/voided/sourcemod-transitional-helpers","last_synced_at":"2025-08-28T06:34:20.944Z","repository":{"id":18477562,"uuid":"21672766","full_name":"voided/sourcemod-transitional-helpers","owner":"voided","description":"A set of helper include files for cleverly (or abusively) working with the SM transitional API.","archived":false,"fork":false,"pushed_at":"2024-01-28T00:02:11.000Z","size":91,"stargazers_count":26,"open_issues_count":0,"forks_count":4,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-01-29T01:04:21.284Z","etag":null,"topics":["sourcemod","sourcemod-plugins","sourcepawn"],"latest_commit_sha":null,"homepage":null,"language":"SourcePawn","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/voided.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2014-07-09T23:51:55.000Z","updated_at":"2024-01-15T02:02:34.000Z","dependencies_parsed_at":"2024-01-28T01:00:39.289Z","dependency_job_id":"73e23a14-78ae-4b7f-89e4-80299130eba0","html_url":"https://github.com/voided/sourcemod-transitional-helpers","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/voided/sourcemod-transitional-helpers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voided%2Fsourcemod-transitional-helpers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voided%2Fsourcemod-transitional-helpers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voided%2Fsourcemod-transitional-helpers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voided%2Fsourcemod-transitional-helpers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/voided","download_url":"https://codeload.github.com/voided/sourcemod-transitional-helpers/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voided%2Fsourcemod-transitional-helpers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272453851,"owners_count":24937469,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-28T02:00:10.768Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["sourcemod","sourcemod-plugins","sourcepawn"],"created_at":"2025-08-28T06:34:20.172Z","updated_at":"2025-08-28T06:34:20.937Z","avatar_url":"https://github.com/voided.png","language":"SourcePawn","funding_links":[],"categories":[],"sub_categories":[],"readme":"## SM Transitional API Helpers\r\n\r\nA set of helper include files for cleverly (or abusively) working with the SM transitional API.\r\n\r\nThese helpers define a hierarchical structure of methodmaps that attempt to emulate the class hierarchy of Source engine entities. Modders should feel right at home by seeing familiar class names such as `CBaseCombatWeapon`, `CBasePlayer`, etc.\r\n\r\n## Usage\r\n\r\nInclude thelpers:\r\n\r\n```sourcepawn\r\n#define GAME_TF2 // required to pull in tf2 related helpers\r\n#include \u003cthelpers\u003e\r\n```\r\n\r\nGo wild:\r\n\r\n```sourcepawn\r\npublic void OnClientPutInServer( int client )\r\n{\r\n  CBasePlayer player = new CBasePlayer( client );\r\n\r\n  char steamId[ 128 ];\r\n  player.GetSteamID( AuthId_Steam2, steamId, sizeof( steamId ) );\r\n\r\n  PrintToServer( \"%N's steam id: %s\", player.Index, steamId );\r\n\r\n  // do some tf2 specific stuff\r\n  CTFPlayer tfPlayer = view_as\u003cCTFPlayer\u003e( player ); // \"downcast\" to a CTFPlayer object\r\n  tfPlayer.SetClass( TFClassType_Medic );\r\n\r\n  // we didn't like them anyway\r\n  ServerCommand( \"sm_kick #%d\", player.UserID );\r\n}\r\n```\r\n\r\n## Documentation\r\n\r\nThe include files themselves are highly documented with doxygen-like comments. Simply browse [around the tree](https://github.com/VoiDeD/sourcemod-transitional-helpers/tree/master/thelpers).\r\n\r\n### Supported Games\r\n\r\nThe API aims to be game-agnostic where possible to support all possible games. However, it is possible to enable game specific features by `#defining GAME_X` before including the thelpers files.\r\n\r\nCurrently only TF2 and some CS:S specific additions have been implemented (enabled with the `GAME_TF2` and `GAME_CSS` defines respectively), but pull requests for other games are welcome!\r\n\r\nIf your game uses econ entities, you can enable econ functionality with `#define GAME_ECON`. This is defined by default for games that have econ entities.\r\n\r\n## Considerations\r\n\r\n- This library likely won't have much active development, but PRs are still welcome.\r\n\r\n### Methodmaps, `null`, \u0026 `INVALID_ENTITY`\r\n\r\nThe thelpers methodmaps originally \"creatively\" utilized the functionality of `__nullable__` to allow comparisons with `null` to check entity validity.\r\n\r\nSourceMod has since updated the syntax to disallow this, so the supported way forward is to perform comparison checks against the `INVALID_ENTITY` constant in this library.\r\n\r\nWhile `__nullable__` now has no useful use in thelpers, the methodmap definitions will remain nullable to support existing consumers who are using the `new ...()` syntax to construct the methodmaps.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoided%2Fsourcemod-transitional-helpers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoided%2Fsourcemod-transitional-helpers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoided%2Fsourcemod-transitional-helpers/lists"}