con un clic
amxmodx-basics
Helps with AMX Mod X (Pawn) coding conventions and best practices.
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Helps with AMX Mod X (Pawn) coding conventions and best practices.
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
Guide for implementing custom weapons using OOP-style patterns in AMX Mod X. Use when creating new weapons or extending existing ones with the Custom Weapons API.
This skill is describing how to use AMXX Modding Kit for AMX Mod X plugin development.
Best practices for organizing large AMX Mod X projects with multiple plugins sharing entities, weapons, events, and other definitions. Use when creating mod-scale projects that need consistent namespace patterns and shared constants.
Guide for Assets API usage managing models, sounds, and resources from JSON configuration files.
Guide for implementing custom entities using OOP-style patterns in AMX Mod X. Use when creating projectiles, pickups, NPCs, or any custom game entity with the Custom Entities API.
Guide for implementing custom events using pub/sub pattern in AMX Mod X. Use when creating event-driven communication between plugins with the Custom Events API.
| name | amxmodx-basics |
| description | Helps with AMX Mod X (Pawn) coding conventions and best practices. |
This document provides an overview of coding conventions for AMX Mod X projects. Each topic is covered in detail in its own file.
| 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 |
| 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 |
| Category | Description |
|---|---|
| Optimizations | Native call reduction, dynamic hooks, model path caching |
| Data Structures | Arrays, Tries, entity access, strings |
#pragma semicolon 1 at file startregister_plugin() - avoid macrosFM_NULLENT instead of -1 or 0 for null entity checksFM_NULLENT after entity creation before processingFM_NULLENT not 0 for failures - 0 is worldspawnMACRO()_Suffix patterns in code - only in macro definitions@ prefix only for OOP-like methods: @{EntityName}_{MethodName}public keyword to @ prefixed functionsconst prefix for all handle argumentsconst &this for "this" argument in OOP-like methodsHAM_* constantsFMRES_* constantsHC_* constantsPLUGIN_* constantsg_pfwham (Ham), g_pfwfm (FakeMeta)get_user_msgid when only used once in register_messageLibraryName_OnSomething - not Fw_ prefixg_pfw prefixNative_ prefix with const for argumentsTask_ prefix with offset in task IDCallback_SQLQuery_{Name} prefixCallback_Menu_{Name} prefixmenu_destroyCommand_ prefix, server commands use ServerCommand_register_concmd for admin commands that should work from RCONclient_cmd - use engclient_cmd for server-side executioncreate_cvar instead of deprecated register_cvarbind_pcvar_* instead of get_pcvar_* for cvar accessg_pTrace - never create trace handles per-callxs_vec_set instead of xs_vec_copy for vector initializationg_rgsz prefix with g_i*Num countergmsg prefix (without underscore)g_rg*[MAX_PLAYERS + 1] with type prefixid for players - use pPlayerindex for entities - use pEntityArrayDestroy, TrieDestroy in plugin_end()