Advertisement
TheReduxPL

Untitled

Sep 7th, 2015
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.95 KB | None | 0 0
  1. #if defined _tf2jail_included
  2. #endinput
  3. #endif
  4. #define _tf2jail_included
  5.  
  6. //Door Controls
  7. enum eDoorsMode
  8. {
  9. OPEN = 0,
  10. CLOSE,
  11. LOCK,
  12. UNLOCK
  13. };
  14.  
  15. // NOTE: Requires you check if the player is in-game, alive, etc.
  16.  
  17. //Natives
  18. /**
  19. * Warden Check if exists.
  20. *
  21. * @return True on success, false on failure.
  22. **/
  23. native TF2Jail_WardenActive();
  24.  
  25. /**
  26. * Returns if client is Warden.
  27. *
  28. * @param client Client is Warden.
  29. * @return True on success, false on failure.
  30. **/
  31. native TF2Jail_IsWarden(client);
  32.  
  33. /**
  34. * Sets a client to Warden.
  35. *
  36. * @param client Client to become Warden.
  37. * @noreturn
  38. **/
  39. native TF2Jail_WardenSet(client);
  40.  
  41. /**
  42. * Remove the Warden if there is one.
  43. *
  44. * @param client Client to remove Warden.
  45. * @noreturn
  46. **/
  47. native TF2Jail_WardenUnset(client);
  48.  
  49. /**
  50. * Returns if the client is a Freeday.
  51. *
  52. * @param client Client is Freeday.
  53. * @return True on success, false on failure.
  54. **/
  55. native TF2Jail_IsFreeday(client);
  56.  
  57. /**
  58. * Sets a client to Freeday.
  59. *
  60. * @param client Client to give Freeday.
  61. * @noreturn
  62. **/
  63. native TF2Jail_GiveFreeday(client);
  64.  
  65. /**
  66. * Removes a client's Freeday.
  67. *
  68. * @param client Client to remove Freeday from.
  69. * @noreturn
  70. **/
  71. native TF2Jail_RemoveFreeday(client);
  72.  
  73. /**
  74. * Returns if the client is a Rebel.
  75. *
  76. * @param client Client is Rebel.
  77. * @return True on success, false on failure.
  78. **/
  79. native TF2Jail_IsRebel(client);
  80.  
  81. /**
  82. * Marks a client as a Rebel.
  83. *
  84. * @param client Client to mark Rebel.
  85. * @noreturn
  86. **/
  87. native TF2Jail_MarkRebel(client);
  88.  
  89. /**
  90. * Returns if the cilent is a Freekiller.
  91. *
  92. * @param client Client is Freekiller.
  93. * @return True on success, false on failure.
  94. **/
  95. native TF2Jail_IsFreekiller(client);
  96.  
  97. /**
  98. * Marks the client as a Freekiller.
  99. *
  100. * @param client Client to mark Freekiller.
  101. * @noreturn
  102. **/
  103. native TF2Jail_MarkFreekiller(client);
  104.  
  105. /**
  106. * Strip clients to melee while using TF2Jail Rules. (Keep Weapons, ammo = 0)
  107. *
  108. * @param client Client to Strip to melee.
  109. * @noreturn
  110. **/
  111. native TF2Jail_StripToMelee(client);
  112.  
  113. /**
  114. * Strip client to melee entirely using TF2Jail rules.
  115. *
  116. * @param client Client to Strip entirely.
  117. * @noreturn
  118. **/
  119. native TF2Jail_StripAllWeapons(client);
  120.  
  121. /**
  122. * Lock warden from being allowed.
  123. *
  124. * @noreturn
  125. **/
  126. native TF2Jail_LockWarden();
  127.  
  128. /**
  129. * Unlock warden from being allowed.
  130. *
  131. * @noreturn
  132. **/
  133. native TF2Jail_UnlockWarden();
  134.  
  135. /**
  136. * Log using TF2Jail's logging system/rules.
  137. *
  138. * @param log String or text to log.
  139. * @param ... Formatting parameters.
  140. * @noreturn
  141. **/
  142. native TF2Jail_Log(const String:log[], any:...);
  143.  
  144. /**
  145. * Returns if the current round is a Last Request day.
  146. *
  147. * @return True on success, false on failure.
  148. **/
  149. native TF2Jail_IsLRRound();
  150.  
  151. /**
  152. * Returns if the current round is a Last Request day.
  153. *
  154. * @param Status Cell to execute. (OPEN, CLOSE, LOCK, UNLOCK) (If doors are locked, they must be unlocked to open)
  155. * @return True on success, false on incompatible map.
  156. **/
  157. native TF2Jail_ManageCells(eDoorsMode:Status);
  158.  
  159. //Forwards
  160. /**
  161. * Called when the Warden has been assigned/created via the plugin or natives.
  162. *
  163. * @param client Client Index
  164. * @noreturn
  165. **/
  166. forward TF2Jail_OnWardenCreated(client);
  167.  
  168. #pragma deprecated Use TF2Jail_OnWardenCreated(client) instead.
  169. forward Warden_OnWardenCreated(client);
  170.  
  171. /**
  172. * Called when the Warden has been removed/retired via the plugin or natives.
  173. *
  174. * @param client Client Index
  175. * @noreturn
  176. **/
  177. forward TF2Jail_OnWardenRemoved(client);
  178.  
  179. #pragma deprecated Use TF2Jail_OnWardenRemoved(client) instead.
  180. forward Warden_OnWardenRemoved(client);
  181.  
  182. /**
  183. * Called when a last request is about to be executed.
  184. *
  185. * @param Handler String or text called by the Handler in the Last Request configuration file. (Use this to differentiate your custom LRs)
  186. * @noreturn
  187. **/
  188. forward TF2Jail_OnLastRequestExecute(const String:Handler[]);
  189.  
  190. /**
  191. * Called when a client is given Freeday. (post)
  192. *
  193. * @param client Client Index
  194. * @noreturn
  195. **/
  196. forward TF2Jail_OnFreedayGiven(client);
  197.  
  198. /**
  199. * Called when a client has been removed from Freeday. (post)
  200. *
  201. * @param client Client Index
  202. * @noreturn
  203. **/
  204. forward TF2Jail_OnFreedayRemoved(client);
  205.  
  206. /**
  207. * Called when a client has marked as a Freekiller. (post)
  208. *
  209. * @param client Client Index
  210. * @noreturn
  211. **/
  212. forward TF2Jail_OnFreekillerGiven(client);
  213.  
  214. /**
  215. * Called when a client has been cleared from Freekiller. (post)
  216. *
  217. * @param client Client Index
  218. * @noreturn
  219. **/
  220. forward TF2Jail_OnFreekillerRemoved(client);
  221.  
  222. /**
  223. * Called when a client has marked as a Rebel. (post)
  224. *
  225. * @param client Client Index
  226. * @noreturn
  227. **/
  228. forward TF2Jail_OnRebelGiven(client);
  229.  
  230. /**
  231. * Called when a client has been cleared from Rebel. (post)
  232. *
  233. * @param client Client Index
  234. * @noreturn
  235. **/
  236. forward TF2Jail_OnRebelRemoved(client);
  237.  
  238. public SharedPlugin:__pl_tf2jail =
  239. {
  240. name = "tf2jail",
  241. file = "TF2Jail.smx",
  242. #if defined REQUIRE_PLUGIN
  243. required = 1,
  244. #else
  245. required = 0,
  246. #endif
  247. };
  248.  
  249. #if !defined REQUIRE_PLUGIN
  250. public __pl_tf2jail_SetNTVOptional()
  251. {
  252. MarkNativeAsOptional("TF2Jail_WardenActive");
  253. MarkNativeAsOptional("TF2Jail_IsWarden");
  254. MarkNativeAsOptional("TF2Jail_WardenSet");
  255. MarkNativeAsOptional("TF2Jail_WardenUnset");
  256. MarkNativeAsOptional("TF2Jail_IsFreeday");
  257. MarkNativeAsOptional("TF2Jail_GiveFreeday");
  258. MarkNativeAsOptional("TF2Jail_RemoveFreeday");
  259. MarkNativeAsOptional("TF2Jail_IsRebel");
  260. MarkNativeAsOptional("TF2Jail_MarkRebel");
  261. MarkNativeAsOptional("TF2Jail_IsFreekiller");
  262. MarkNativeAsOptional("TF2Jail_MarkFreekiller");
  263. MarkNativeAsOptional("TF2Jail_StripToMelee");
  264. MarkNativeAsOptional("TF2Jail_StripAllWeapons");
  265. MarkNativeAsOptional("TF2Jail_LockWarden");
  266. MarkNativeAsOptional("TF2Jail_UnlockWarden");
  267. MarkNativeAsOptional("TF2Jail_IsLRRound");
  268. MarkNativeAsOptional("TF2Jail_ManageCells");
  269. }
  270. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement