Advertisement
Guest User

pwncmddddd

a guest
Sep 26th, 2016
338
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.90 KB | None | 0 0
  1. /*
  2. * The MIT License (MIT)
  3. *
  4. * Copyright (c) 2016 urShadow
  5. *
  6. * Permission is hereby granted, free of charge, to any person obtaining a copy
  7. * of this software and associated documentation files (the "Software"), to deal
  8. * in the Software without restriction, including without limitation the rights
  9. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  10. * copies of the Software, and to permit persons to whom the Software is
  11. * furnished to do so, subject to the following conditions:
  12. *
  13. * The above copyright notice and this permission notice shall be included in all
  14. * copies or substantial portions of the Software.
  15. *
  16. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  17. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  18. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  19. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  20. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  21. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  22. * SOFTWARE.
  23. */
  24.  
  25. #if !defined PAWNCMD_INC_
  26. #define PAWNCMD_INC_
  27.  
  28. #define PAWNCMD_INCLUDE_VERSION 312
  29.  
  30. #if !defined __cplusplus
  31. public _pawncmd_version = PAWNCMD_INCLUDE_VERSION;
  32. #pragma unused _pawncmd_version
  33.  
  34. public bool:_pawncmd_is_gamemode = !defined FILTERSCRIPT;
  35. #pragma unused _pawncmd_is_gamemode
  36.  
  37. native PC_RegAlias(const cmd[], const alias[], ...);
  38. native PC_SetFlags(const cmd[], flags);
  39. native PC_GetFlags(const cmd[]);
  40. native PC_EmulateCommand(playerid, const cmdtext[]);
  41. native PC_RenameCommand(const cmd[], const newname[]);
  42. native PC_CommandExists(const cmd[]);
  43. native PC_DeleteCommand(const cmd[]);
  44.  
  45. native CmdArray:PC_GetCommandArray();
  46. native CmdArray:PC_GetAliasArray(const cmd[]);
  47. native PC_GetArraySize(CmdArray:arr);
  48. native PC_FreeArray(&CmdArray:arr);
  49. native PC_GetCommandName(CmdArray:arr, index, dest[], size = sizeof dest);
  50.  
  51. #if defined PC_OnInit
  52. forward PC_OnInit();
  53. #endif
  54.  
  55. #if defined OnPlayerCommandReceived
  56. forward OnPlayerCommandReceived(playerid, cmd[], params[], flags);
  57. #endif
  58.  
  59. #if defined OnPlayerCommandPerformed
  60. forward OnPlayerCommandPerformed(playerid, cmdtext[], success)
  61. #endif
  62.  
  63. #define cmd:%0(%1) \
  64. forward pc_cmd_%0(%1); \
  65. public pc_cmd_%0(%1)
  66.  
  67. #define alias:%0(%1); \
  68. forward pc_alias_%0(); \
  69. public pc_alias_%0() \
  70. PC_RegAlias(#%0, %1);
  71.  
  72. #define flags:%0(%1); \
  73. forward pc_flags_%0(); \
  74. public pc_flags_%0() \
  75. PC_SetFlags(#%0, %1);
  76.  
  77. #define CMD cmd
  78.  
  79. #define COMMAND cmd
  80.  
  81. #define callcmd::%0(%1) \
  82. pc_cmd_%0(%1)
  83.  
  84. #define PC_HasFlag(%0,%1) \
  85. (PC_GetFlags(%0) & %1)
  86.  
  87. #if !defined isnull
  88. #define isnull(%0) \
  89. ((!(%0[0])) || (((%0[0]) == '\1') && (!(%0[1]))))
  90. #endif
  91. #endif
  92. #endif // PAWNCMD_INC_
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement