Loading...
Loading...
Compare original and translation side by side
| Category | Description |
|---|---|
| Basics | Syntax, basics |
| Code Style | File structure, formatting, braces, spacing, plugin registration |
| Naming Conventions | Hungarian notation, variable prefixes, naming patterns |
| Constants & Enums | Define constants, enums, TASKID constants |
| Macros | Common macros, IS_PLAYER, patterns to avoid |
| Function Declarations | Return types, @ prefix, static variables |
| Validations | FM_NULLENT, entity checks, player validation, early returns |
| 分类 | 描述 |
|---|---|
| 基础 | 语法、基础知识 |
| 代码风格 | 文件结构、格式、大括号、间距、插件注册 |
| 命名规范 | 匈牙利命名法、变量前缀、命名模式 |
| 常量与枚举 | 定义常量、枚举、TASKID常量 |
| 宏 | 常用宏、IS_PLAYER、需避免的模式 |
| 函数声明 | 返回类型、@前缀、静态变量 |
| 验证 | FM_NULLENT、实体检查、玩家验证、提前返回 |
| Category | Description |
|---|---|
| Hooks | Ham, FakeMeta, ReAPI, Event, Message hooks and handles |
| Forwards | CreateMultiForward, ExecuteForward, pre/post patterns |
| Natives | Native registration and implementation |
| Callbacks | Tasks, SQL queries, CVar queries |
| Menus | Menu creation, callbacks, and patterns |
| Commands | Client, server, and console commands |
| CVars | CVar creation, binding, and change hooks |
| 分类 | 描述 |
|---|---|
| 钩子 | Ham、FakeMeta、ReAPI、事件、消息钩子及句柄 |
| 转发 | CreateMultiForward、ExecuteForward、前置/后置模式 |
| 原生函数 | 原生函数注册与实现 |
| 回调 | 任务、SQL查询、CVar查询 |
| 菜单 | 菜单创建、回调及模式 |
| 命令 | 客户端、服务器及控制台命令 |
| CVar | CVar创建、绑定及变更钩子 |
| Category | Description |
|---|---|
| Optimizations | Native call reduction, dynamic hooks, model path caching |
| Data Structures | Arrays, Tries, entity access, strings |
| 分类 | 描述 |
|---|---|
| 优化 | 减少原生函数调用、动态钩子、模型路径缓存 |
| 数据结构 | 数组、Trie、实体访问、字符串 |
| API | Description |
|---|---|
| assets | Asset management from JSON configs |
| custom-entities | OOP-style custom entities |
| custom-events | Pub/sub event system |
| custom-weapons | Custom weapon framework |
| entity-force | Physics force application |
| entity-grab | Entity grab and carry |
| player-camera | Custom camera views |
| player-model | Custom player models |
| player-music | MP3 music playback |
| player-roles | Player role management |
| rounds | Round management |
| shops | In-game shop system |
| states | State machine implementation |
| API | 描述 |
|---|---|
| assets | 基于JSON配置的资源管理 |
| custom-entities | 面向对象风格的自定义实体 |
| custom-events | 发布/订阅事件系统 |
| custom-weapons | 自定义武器框架 |
| entity-force | 物理力施加 |
| entity-grab | 实体抓取与携带 |
| player-camera | 自定义相机视角 |
| player-model | 自定义玩家模型 |
| player-music | MP3音乐播放 |
| player-roles | 玩家角色管理 |
| rounds | 回合管理 |
| shops | 游戏内商店系统 |
| states | 状态机实现 |
#pragma semicolon 1register_plugin()#pragma semicolon 1register_plugin()FM_NULLENT-10FM_NULLENTFM_NULLENT00FM_NULLENT-10FM_NULLENTFM_NULLENT00MACRO()_SuffixMACRO()_Suffix@@{EntityName}_{MethodName}public@constconst &this@@{EntityName}_{MethodName}@publicconstconst &thisHAM_*FMRES_*HC_*PLUGIN_*g_pfwhamg_pfwfmget_user_msgidregister_messageHAM_*FMRES_*HC_*PLUGIN_*g_pfwhamg_pfwfmget_user_msgidregister_messageLibraryName_OnSomethingFw_g_pfwLibraryName_OnSomethingFw_g_pfwNative_constTask_Callback_SQLQuery_{Name}Native_constTask_Callback_SQLQuery_{Name}Callback_Menu_{Name}menu_destroyCallback_Menu_{Name}menu_destroyCommand_ServerCommand_register_concmdclient_cmdengclient_cmdcreate_cvarregister_cvarbind_pcvar_*get_pcvar_*Command_ServerCommand_register_concmdclient_cmdengclient_cmdcreate_cvarregister_cvarbind_pcvar_*get_pcvar_*g_pTracexs_vec_setxs_vec_copyg_pTracexs_vec_setxs_vec_copyg_rgszg_i*Numgmsgg_rg*[MAX_PLAYERS + 1]idpPlayerindexpEntityg_rgszg_i*Numgmsgg_rg*[MAX_PLAYERS + 1]idpPlayerindexpEntityArrayDestroyTrieDestroyplugin_end()plugin_end()ArrayDestroyTrieDestroy