File size: 3,616 Bytes
72629ed | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | #if !defined PAWNCMD_INC_
#define PAWNCMD_INC_
#if !defined PACK_PLUGIN_VERSION
#define PACK_PLUGIN_VERSION(%0,%1,%2) (((%0) << 16) | ((%1) << 8) | (%2))
#endif
#define PAWNCMD_VERSION PACK_PLUGIN_VERSION(3, 4, 0)
#define PAWNCMD_INCLUDE_VERSION PAWNCMD_VERSION
#if !defined __cplusplus
public _pawncmd_version = PAWNCMD_VERSION;
#pragma unused _pawncmd_version
public bool:_pawncmd_is_gamemode = !defined FILTERSCRIPT;
#pragma unused _pawncmd_is_gamemode
native PC_Init();
native PC_RegAlias(const cmd[], const alias[], ...);
native PC_SetFlags(const cmd[], flags);
native PC_GetFlags(const cmd[]);
native PC_RenameCommand(const cmd[], const newname[]);
native PC_CommandExists(const cmd[]);
native PC_DeleteCommand(const cmd[]);
native CmdArray:PC_GetCommandArray();
native CmdArray:PC_GetAliasArray(const cmd[]);
native PC_GetArraySize(CmdArray:arr);
native PC_GetCommandName(CmdArray:arr, index, dest[], size = sizeof dest);
native PC_FreeArray(&CmdArray:arr);
native PC_EmulateCommand(playerid, const cmdtext[]);
#if defined PC_OnInit
forward PC_OnInit();
#endif
#if defined OnPlayerCommandReceived
forward OnPlayerCommandReceived(playerid, cmd[], params[], flags);
#endif
#if defined OnPlayerCommandPerformed
forward OnPlayerCommandPerformed(playerid, cmd[], params[], result, flags);
#endif
#define cmd:%0(%1) \
forward pc_cmd_%0(%1); \
public pc_cmd_%0(%1)
#define alias:%0(%1) \
forward pc_alias_%0(); \
public pc_alias_%0() \
PC_RegAlias(#%0, %1);
#define flags:%0(%1) \
forward pc_flags_%0(); \
public pc_flags_%0() \
PC_SetFlags(#%0, %1);
#define CMD cmd
#define COMMAND cmd
#define callcmd::%0(%1) \
pc_cmd_%0(%1)
#define PC_HasFlag(%0,%1) \
(PC_GetFlags(%0) & %1)
#if !defined isnull
#define isnull(%0) \
((!(%0[0])) || (((%0[0]) == '\1') && (!(%0[1]))))
#endif
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
PC_Init();
#if defined PawnCmd_OnFilterScriptInit
PawnCmd_OnFilterScriptInit();
#endif
return 1;
}
#if defined _ALS_OnFilterScriptInit
#undef OnFilterScriptInit
#else
#define _ALS_OnFilterScriptInit
#endif
#define OnFilterScriptInit PawnCmd_OnFilterScriptInit
#if defined PawnCmd_OnFilterScriptInit
forward PawnCmd_OnFilterScriptInit();
#endif
#else
public OnGameModeInit()
{
PC_Init();
#if defined PawnCmd_OnGameModeInit
PawnCmd_OnGameModeInit();
#endif
return 1;
}
#if defined _ALS_OnGameModeInit
#undef OnGameModeInit
#else
#define _ALS_OnGameModeInit
#endif
#define OnGameModeInit PawnCmd_OnGameModeInit
#if defined PawnCmd_OnGameModeInit
forward PawnCmd_OnGameModeInit();
#endif
#endif
#endif
#endif |