YSI.inc 29 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025
  1. /*----------------------------------------------------------------------------*\
  2. =======================================
  3. YSI - YSI Server Includes functions
  4. =======================================
  5. Description:
  6. Lists all the functions available in YSI for PAWNO.
  7. Legal:
  8. Version: MPL 1.1
  9. The contents of this file are subject to the Mozilla Public License Version
  10. 1.1 (the "License"); you may not use this file except in compliance with
  11. the License. You may obtain a copy of the License at
  12. http://www.mozilla.org/MPL/
  13. Software distributed under the License is distributed on an "AS IS" basis,
  14. WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  15. for the specific language governing rights and limitations under the
  16. License.
  17. The Original Code is the YSI group include.
  18. The Initial Developer of the Original Code is Alex "Y_Less" Cole.
  19. Portions created by the Initial Developer are Copyright (C) 2011
  20. the Initial Developer. All Rights Reserved.
  21. Contributors:
  22. ZeeX, koolk, JoeBullet/Google63, g_aSlice/Slice
  23. Thanks:
  24. JoeBullet/Google63 - Handy arbitrary ASM jump code using SCTRL.
  25. ZeeX - Very productive conversations.
  26. koolk - IsPlayerinAreaEx code.
  27. TheAlpha - Danish translation.
  28. breadfish - German translation.
  29. Fireburn - Dutch translation.
  30. yom - French translation.
  31. 50p - Polish translation.
  32. Zamaroht - Spanish translation.
  33. Dracoblue, sintax, mabako, Xtreme, other coders - Producing other modes
  34. for me to strive to better.
  35. Pixels^ - Running XScripters where the idea was born.
  36. Matite - Pestering me to release it and using it.
  37. Very special thanks to:
  38. Thiadmer - PAWN, whose limits continue to amaze me!
  39. Kye/Kalcor - SA:MP.
  40. SA:MP Team past, present and future - SA:MP.
  41. Version:
  42. 1.0
  43. Changelog:
  44. 25/02/12:
  45. First version
  46. \*----------------------------------------------------------------------------*/
  47. #include <YSI\internal\y_version>
  48. /*
  49. native
  50. native __y_als__();
  51. native
  52. native
  53. native
  54. */
  55. // CAN'T include by default.
  56. //#include <YSI\y_als>
  57. /*
  58. native
  59. native __y_amx__();
  60. native
  61. native
  62. native AMX_GetBaseCount(E_AMX_TABLE:table, &base, &count)
  63. native AMX_GetGlobalAddress(...);
  64. native AMX_Read(addr)
  65. native AMX_Write(addr, value)
  66. native AMX_ReadString(addr, str[], len = sizeof (str))
  67. native AMX_WriteString(addr, const str[], len = sizeof (str))
  68. native AMX_ReadArray(addr, dest[], len = sizeof (dest))
  69. native AMX_WriteArray(addr, const src[], len = sizeof (src))
  70. native
  71. native AMX_GetPublicEntry(idx, &buffer, const pattern[] = "")
  72. native AMX_GetNativeEntry(idx, &buffer, const pattern[] = "")
  73. native AMX_GetLibraryEntry(idx, &buffer, const pattern[] = "")
  74. native AMX_GetPubvarEntry(idx, &buffer, const pattern[] = "")
  75. native AMX_GetTagEntry(idx, &buffer, const pattern[] = "")
  76. native AMX_GetEntry(E_AMX_TABLE:table, idx, &buffer, const pattern[] = "")
  77. native
  78. native AMX_GetPublicEntryPrefix(idx, &buffer, pattern)
  79. native AMX_GetNativeEntryPrefix(idx, &buffer, pattern)
  80. native AMX_GetLibraryEntryPrefix(idx, &buffer, pattern)
  81. native AMX_GetPubvarEntryPrefix(idx, &buffer, pattern)
  82. native AMX_GetTagEntryPrefix(idx, &buffer, pattern)
  83. native AMX_GetEntryPrefix(E_AMX_TABLE:table, idx, &buffer, pattern)
  84. native
  85. native AMX_GetPublicEntrySuffix(idx, &buffer, pattern)
  86. native AMX_GetNativeEntrySuffix(idx, &buffer, pattern)
  87. native AMX_GetLibraryEntrySuffix(idx, &buffer, pattern)
  88. native AMX_GetPubvarEntrySuffix(idx, &buffer, pattern)
  89. native AMX_GetTagEntrySuffix(idx, &buffer, pattern)
  90. native AMX_GetEntrySuffix(E_AMX_TABLE:table, idx, &buffer, pattern)
  91. native
  92. native AMX_GetPublicName(idx, buffer[32], const pattern[] = "")
  93. native AMX_GetNativeName(idx, buffer[32], const pattern[] = "")
  94. native AMX_GetLibraryName(idx, buffer[32], const pattern[] = "")
  95. native AMX_GetPubvarName(idx, buffer[32], const pattern[] = "")
  96. native AMX_GetTagName(idx, buffer[32], const pattern[] = "")
  97. native AMX_GetName(E_AMX_TABLE:table, idx, buffer[32], const pattern[] = "")
  98. native
  99. native AMX_GetPublicNamePrefix(idx, buffer[32], pattern)
  100. native AMX_GetNativeNamePrefix(idx, buffer[32], pattern)
  101. native AMX_GetLibraryNamePrefix(idx, buffer[32], pattern)
  102. native AMX_GetPubvarNamePrefix(idx, buffer[32], pattern)
  103. native AMX_GetTagNamePrefix(idx, buffer[32], pattern)
  104. native AMX_GetNamePrefix(E_AMX_TABLE:table, idx, buffer[32], pattern)
  105. native
  106. native AMX_GetPublicNameSuffix(idx, buffer[32], pattern)
  107. native AMX_GetNativeNameSuffix(idx, buffer[32], pattern)
  108. native AMX_GetLibraryNameSuffix(idx, buffer[32], pattern)
  109. native AMX_GetPubvarNameSuffix(idx, buffer[32], pattern)
  110. native AMX_GetTagNameSuffix(idx, buffer[32], pattern)
  111. native AMX_GetNameSuffix(E_AMX_TABLE:table, idx, buffer[32], pattern)
  112. native
  113. native AMX_GetPublicPointer(idx, &buffer, const pattern[] = "")
  114. native AMX_GetNativePointer(idx, &buffer, const pattern[] = "")
  115. native AMX_GetLibraryPointer(idx, &buffer, const pattern[] = "")
  116. native AMX_GetPubvarPointer(idx, &buffer, const pattern[] = "")
  117. native AMX_GetTagPointer(idx, &buffer, const pattern[] = "")
  118. native AMX_GetPointer(E_AMX_TABLE:table, idx, &buffer, const pattern[] = "")
  119. native
  120. native AMX_GetPublicPointerPrefix(idx, &buffer, pattern)
  121. native AMX_GetNativePointerPrefix(idx, &buffer, pattern)
  122. native AMX_GetLibraryPointerPrefix(idx, &buffer, pattern)
  123. native AMX_GetPubvarPointerPrefix(idx, &buffer, pattern)
  124. native AMX_GetTagPointerPrefix(idx, &buffer, pattern)
  125. native AMX_GetPointerPrefix(E_AMX_TABLE:table, idx, &buffer, pattern)
  126. native
  127. native AMX_GetPublicPointerSuffix(idx, &buffer, pattern)
  128. native AMX_GetNativePointerSuffix(idx, &buffer, pattern)
  129. native AMX_GetLibraryPointerSuffix(idx, &buffer, pattern)
  130. native AMX_GetPubvarPointerSuffix(idx, &buffer, pattern)
  131. native AMX_GetTagPointerSuffix(idx, &buffer, pattern)
  132. native AMX_GetPointerSuffix(E_AMX_TABLE:table, idx, &buffer, pattern)
  133. native
  134. native AMX_GetPublicValue(idx, &buffer, const pattern[] = "")
  135. native AMX_GetNativeValue(idx, &buffer, const pattern[] = "")
  136. native AMX_GetLibraryValue(idx, &buffer, const pattern[] = "")
  137. native AMX_GetPubvarValue(idx, &buffer, const pattern[] = "")
  138. native AMX_GetTagValue(idx, &buffer, const pattern[] = "")
  139. native AMX_GetValue(E_AMX_TABLE:table, idx, &buffer, const pattern[] = "")
  140. native
  141. native AMX_GetPublicValuePrefix(idx, &buffer, pattern)
  142. native AMX_GetNativeValuePrefix(idx, &buffer, pattern)
  143. native AMX_GetLibraryValuePrefix(idx, &buffer, pattern)
  144. native AMX_GetPubvarValuePrefix(idx, &buffer, pattern)
  145. native AMX_GetTagValuePrefix(idx, &buffer, pattern)
  146. native AMX_GetValuePrefix(E_AMX_TABLE:table, idx, &buffer, pattern)
  147. native
  148. native AMX_GetPublicValueSuffix(idx, &buffer, pattern)
  149. native AMX_GetNativeValueSuffix(idx, &buffer, pattern)
  150. native AMX_GetLibraryValueSuffix(idx, &buffer, pattern)
  151. native AMX_GetPubvarValueSuffix(idx, &buffer, pattern)
  152. native AMX_GetTagValueSuffix(idx, &buffer, pattern)
  153. native AMX_GetValueSuffix(E_AMX_TABLE:table, idx, &buffer, pattern)
  154. native
  155. */
  156. #include <YSI\y_amx>
  157. /*
  158. native
  159. native __y_areas__();
  160. native
  161. native
  162. native Area_AddCube(Float:x0, Float:y0, Float:z0, Float:x1, Float:y1, Float:z1);
  163. native Area_AddBox(Float:minx, Float:miny, Float:maxx, Float:maxy);
  164. native Area_AddCircle(Float:x, Float:y, Float:r, Float:h = FLOAT_INFINITY)
  165. native Area_AddSphere(Float:x, Float:y, Float:z, Float:r);
  166. native Area_AddPoly(Float:x1, Float:y1, Float:x2, Float:y2, Float:x3, Float:y3, Float:...);
  167. native Area_Delete(area);
  168. native Area_GetPlayerArea(playerid);
  169. native Area_SetPlayer(area, playerid, bool:set);
  170. native bool:Area_GetPlayer(area, playerid);
  171. native Area_SetAllPlayers(area, bool:set);
  172. native Area_SetWorld(area, world, bool:set);
  173. native bool:Area_GetWorld(area, world);
  174. native Area_SetAllWorlds(area, bool:set);
  175. native bool:Area_IsValid(area);
  176. native bool:Area_IsEmpty(area);
  177. native
  178. */
  179. //#include <YSI\y_areas>
  180. /*
  181. native
  182. native __y_bintree__();
  183. native
  184. native
  185. native Bintree_Generate(BinaryTree:output<>, input[][E_BINTREE_INPUT], size);
  186. native Bintree_Reset(BinaryTree:tree<>, pointer = 0);
  187. native Bintree_FindValue(BinaryTree:tree<>, value, &cont = 0, &old = 0);
  188. native Bintree_Add(BinaryTree:data<>, pointer, value, offset, maxsize = sizeof (data));
  189. native Bintree_Delete(BinaryTree:source<>, index, count);
  190. native Bintree_UpdatePointers(BinaryTree:data<>, offset, size, mod = -1);
  191. native
  192. */
  193. #include <YSI\y_bintree>
  194. /*
  195. native
  196. native __y_bit__();
  197. native
  198. native
  199. native Bit_Set(BitArray:array<>, slot, bool:set);
  200. native Bit_SetAll(BitArray:array<>, bool:set, size = sizeof (array));
  201. native Bit_Get(BitArray:array<>, slot);
  202. native Bit_Let(BitArray:array<>, slot);
  203. native Bit_Vet(BitArray:array<>, slot);
  204. native Bit_Slot(value);
  205. native Bit_Mask(value);
  206. native Bit_GetCount(BitArray:array<>, size = sizeof (array));
  207. native Bit_Display(BitArray:array<>, size = sizeof (array));
  208. native Iterator:Bits(BitArray:array<>);
  209. native Iterator:Blanks(BitArray:array<>);
  210. native
  211. native bits();
  212. native bitsof();
  213. native
  214. */
  215. #include <YSI\y_bit>
  216. /*
  217. native
  218. native __y_cell__();
  219. native
  220. native
  221. native Cell_ReverseBits({Float, _}:data);
  222. native Cell_ReverseNibbles({Float, _}:data);
  223. native Cell_ReverseBytes({Float, _}:data);
  224. native Cell_CountBits({Float, _}:data);
  225. native Cell_GetLowestBit({Float, _}:data);
  226. native Cell_GetLowestComponent({Float, _}:data);
  227. native
  228. */
  229. #include <YSI\y_cell>
  230. /*
  231. native
  232. native __y_classes__();
  233. native
  234. native
  235. native Class_Add(skin, Float:x, Float:y, Float:z, Float:a, ...);
  236. native
  237. native Class_AddEx(Group:forgroup, Group:setgroup, skin, Float:x, Float:y, Float:z, Float:a, ...);
  238. native Class_AddForGroup(Group:group, skin, Float:x, Float:y, Float:z, Float:a, ...);
  239. native Class_AddWithGroupSet(Group:group, skin, Float:x, Float:y, Float:z, Float:a, ...);
  240. native Class_Enable(classid, bool:toggle);
  241. native Class_Delete(classid);
  242. native Class_SetPlayer(classid, playerid, bool:s);
  243. native bool:Class_GetPlayer(classid, playerid);
  244. native Class_Get(playerid);
  245. native Class_Goto(playerid, playerclass);
  246. native
  247. native Class_DisableSelection(playerid);
  248. native Class_DisableReselection(playerid);
  249. native Class_EnableReselection(playerid);
  250. native Class_ForceReselection(playerid);
  251. native Class_ReturnToSelection(playerid);
  252. native
  253. */
  254. #include <YSI\y_classes>
  255. /*
  256. native
  257. native __y_colours__();
  258. native __y_colors__();
  259. native
  260. native
  261. native SetColoursCanHaveSpaces(bool:set);
  262. native SetColour(const name[], color);
  263. native SetColourHash(hash, color);
  264. native GetColour(const name[], alpha = 0xAA);
  265. native GetColourStream(const str[], &idx, alpha = 0xAA);
  266. native GetColourHash(hash, alpha = 0xAA);
  267. native
  268. */
  269. #include <YSI\y_colours>
  270. /*
  271. native
  272. native __y_commands__();
  273. native
  274. native
  275. native Command_AddAlt(commandid, altname[]);
  276. native Command_AddAltNamed(command[], altname[]);
  277. native Command_SetPlayer(commandid, playerid, bool:set);
  278. native Command_SetPlayerNamed(command[], playerid, bool:set);
  279. native
  280. native Command_SetDeniedReturn(bool:set);
  281. native bool:Command_GetDeniedReturn();
  282. native Command_SetIllegalReturn(bool:set);
  283. native bool:Command_GetIllegalReturn();
  284. native Command_SetUnknownReturn(bool:set);
  285. native bool:Command_GetUnknownReturn();
  286. native Command_SetDisconnectReturn(bool:set);
  287. native bool:Command_GetDisconnectReturn();
  288. native
  289. native Command_GetID(command[]);
  290. native bool:Command_GetPlayer(commandid, playerid);
  291. native bool:Command_GetPlayerNamed(command[], playerid);
  292. native Command_Remove(commandid);
  293. native Command_RemoveNamed(command[]);
  294. native Command_ReProcess(playerid, cmdtext[], help);
  295. native Command_GetName(commandid);
  296. native Command_GetDisplay(commandid, playerid);
  297. native Command_GetDisplayNamed(command[], playerid);
  298. native Command_GetPlayerCommandCount(playerid);
  299. native Command_GetNext(index, playerid);
  300. native
  301. native Command_SetProvider(p);
  302. native Command_GetProvider();
  303. native Command_SetPlayerProvider(playerid, p);
  304. native Command_GetPlayerProvider(playerid);
  305. native
  306. */
  307. #include <YSI\y_commands>
  308. /*
  309. native
  310. native __y_debug__();
  311. native
  312. native
  313. native P_level(str[], {Float, _}:...);
  314. native P_I(str[], {Float, _}:...);
  315. native P_W(str[], {Float, _}:...);
  316. native P_E(str[], {Float, _}:...);
  317. native P_F(str[], {Float, _}:...);
  318. native P_C(str[], {Float, _}:...);
  319. native
  320. */
  321. #include <YSI\y_debug>
  322. /*
  323. native
  324. native __y_dialog__();
  325. native
  326. native
  327. native Dialog_Show(playerid, style, title[], caption[], button1[], button2[] = "", dialogid = -1);
  328. native Dialog_ShowCallback(playerid, using:callback[], style, title[], caption[], button1[], button2[] = "", dialogid = -1);
  329. native
  330. native Dialog_ObtainID();
  331. native Dialog_TryObtainID(id);
  332. native Dialog_Get(playerid);
  333. native Dialog_Garbage(dialogid);
  334. native Dialog_Free(dialogid);
  335. native Dialog_Set(playerid, dialogid);
  336. native Dialog_ShowCallbackData(playerid, callback[E_CALLBACK_DATA], style, title[], caption[], button1[], button2[] = "", dialogid = -1);
  337. native Dialog_Hide(playerid);
  338. native Dialog_SetCallback(dialogid, using:callback[]);
  339. native Dialog_SetCallbackData(dialogid, callback[E_CALLBACK_DATA]);
  340. native
  341. */
  342. #include <YSI\y_dialog>
  343. /*
  344. native
  345. native __y_flooding__();
  346. native
  347. native
  348. native SetMaxConnections(max = -1, e_FLOOD_ACTION:action = e_FLOOD_ACTION_BLOCK)
  349. native
  350. */
  351. #include <YSI\y_flooding>
  352. /*
  353. native
  354. native __y_groups__();
  355. native
  356. native
  357. native Group:Group_Create(name[]);
  358. native Group_Destroy(Group:group);
  359. native Group_SetPlayer(Group:group, playerid, bool:s);
  360. native bool:Group_GetPlayer(Group:group, playerid);
  361. native
  362. native Group_SetGroup(Group:parent, Group:child, bool:s);
  363. native Group_SetGlobalGroup(Group:child, bool:s);
  364. naitve
  365. native Group_SetCommand(Group:group, commandid, bool:s);
  366. native Group_SetCommandDefault(Group:group, bool:s);
  367. native Group_SetGlobalCommand(commandid, bool:s);
  368. native Group_SetGlobalCommandDefault(bool:s);
  369. native
  370. native Group_SetArea(Group:group, area, bool:s);
  371. native Group_SetAreaDefault(Group:group, bool:s);
  372. native Group_SetGlobalArea(area, bool:s);
  373. native Group_SetGlobalAreaDefault(bool:s);
  374. native
  375. native Group_SetClass(Group:group, class, bool:s);
  376. native Group_SetClassDefault(Group:group, bool:s);
  377. native Group_SetGlobalClass(class, bool:s);
  378. native Group_SetGlobalCalssDefault(bool:s);
  379. native
  380. native Iterator:PlayerGroups(playerid)
  381. native Iterator:Group(Group:group)
  382. native
  383. native Group:Group_SetBalanced(playerid, Group:...)
  384. native Group_GetColour(Group:group);
  385. native Group_GetColor(Group:group);
  386. native Group_SetColour(Group:group, colour);
  387. native Group_SetColor(Group:group, color);
  388. native bool:Group_GetGang(Group:group);
  389. native Group_SetGang(Group:group, bool:set);
  390. native Group:Group_GetID(name[]);
  391. native Group_GetName(Group:group);
  392. native Group_SetName(Group:group, name[]);
  393. native
  394. */
  395. #include <YSI\y_groups>
  396. /*
  397. native
  398. native __y_hooks__();
  399. native
  400. native
  401. native hook();
  402. native
  403. */
  404. // Is included as then they can use hooks straight off.
  405. #include <YSI\y_hooks>
  406. /*
  407. native
  408. native __y_ini__();
  409. native
  410. native
  411. native bool:INI_ParseFile(fname[], remoteFormat[], bool:bFileFirst = false, bool:bExtra = false, extra = 0, bool:bLocal = true, bool:bPassTag = false, bool:bFilter = true, filter[] = "")
  412. native bool:INI_Load(filename[], bool:bExtra = false, extra = 0, bool:bLocal = true)
  413. native
  414. native INI_Int(name[], &dest);
  415. native INI_Float(name[], &Float:dest);
  416. native INI_Hex(name[], &dest);
  417. native INI_Bin(name[], &dest);
  418. native INI_String(name[], dest[], size);
  419. native
  420. native INI:INI_Open(filename[])
  421. native INI_Close(INI:file)
  422. native
  423. native INI_SetTag(INI:file, tag[])
  424. native INI_DeleteTag(INI:file, tag[])
  425. native INI_WriteArray(INI:file, const name[], data[], len)
  426. native INI_RemoveEntry(INI:file, name[])
  427. native INI_WriteString(INI:file, name[], data[])
  428. native INI_WriteInt(INI:file, name[], data)
  429. native INI_WriteHex(INI:file, name[], data)
  430. native INI_WriteBin(INI:file, name[], data)
  431. native INI_WriteBool(INI:file, name[], bool:data)
  432. native INI_WriteFloat(INI:file, name[], Float:data, accuracy = 6)
  433. native
  434. */
  435. #include <YSI\y_ini>
  436. /*
  437. native
  438. native __y_inline__();
  439. native
  440. native
  441. native using();
  442. native inline();
  443. native
  444. native Callback_Get(callback:name, result[E_CALLBACK_DATA], expect = -1);
  445. native Callback_Release(const input[E_CALLBACK_DATA]);
  446. native Callback_Call(const input[E_CALLBACK_DATA], {Float, _}:...);
  447. native
  448. */
  449. #include <YSI\y_inline>
  450. /*
  451. native
  452. native __y_iterate__();
  453. native
  454. native
  455. native Iter_Init(Iterator:arr[]<>);
  456. native Iter_Add(Iterator:iter<>, element);
  457. native Iter_Remove(Iterator:iter<>, element);
  458. native Iter_Contains(Iterator:iter<>, element);
  459. native Iter_SafeRemove(Iterator:iter<>, element, &ret);
  460. native Iter_Random(Iterator:iter<>);
  461. native Iter_Count(Iterator:iter<>);
  462. native Iter_Clear(Iterator:iter<>);
  463. native Iter_Free(Iterator:iter<>);
  464. native
  465. native foreach();
  466. native
  467. native Iter_Begin(Iterator:iter<>);
  468. native Iter_End(Iterator:iter<>);
  469. native Iter_First(Iterator:iter<>);
  470. native Iter_Last(Iterator:iter<>);
  471. native Iter_Next(Iterator:iter<>, cur);
  472. native Iter_Prev(Iterator:iter<>, cur);
  473. native
  474. */
  475. #include <YSI\y_iterate>
  476. /*
  477. native
  478. native __y_languages__();
  479. native
  480. native
  481. native Language:Langs_Add(code[], name[]);
  482. native Language:Langs_SetPlayerLanguage(playerid, Language:l);
  483. native Language:Langs_GetPlayerLanguage(playerid);
  484. native
  485. native Language:Langs_AddLanguage(code[], name[]);
  486. native Langs_RemoveLanguage(Language:l);
  487. native Language:Langs_GetLanguage(identifier[]);
  488. native Language:Langs_GetLanguageCount();
  489. native Langs_GetLanguageCodes();
  490. native Langs_GetName(Language:l);
  491. native Langs_GetCode(Language:l);
  492. native bool:Langs_IsValid(Language:l);
  493. native Language:Langs_SetPlayerCode(playerid, code[]);
  494. native
  495. */
  496. #include <YSI\y_languages>
  497. /*
  498. native
  499. native __y_lock__();
  500. native
  501. native
  502. native
  503. */
  504. // DO NOT include by default!
  505. //#include <YSI\y_lock>
  506. /*
  507. native
  508. native __y_malloc__();
  509. native
  510. native
  511. native Alloc:malloc(size);
  512. native Alloc:calloc(size);
  513. native free(Alloc:slot);
  514. native
  515. native mget(Alloc:array, index);
  516. native mset(Alloc:array, index, value);
  517. native mgets(target[], length, Alloc:array, index);
  518. native msets(Alloc:array, index, const str[]);
  519. native
  520. native Malloc_SlotSize(Alloc:array);
  521. native Malloc_Get(Alloc:array, index);
  522. native Malloc_Set(Alloc:array, index, value);
  523. native Malloc_GetS(target[], length, Alloc:array, index);
  524. native Malloc_SetS(Alloc:array, index, const str[]);
  525. native Malloc_GetA(target[], length, Alloc:array, index);
  526. native Malloc_SetA(Alloc:array, index, const arr[], len);
  527. native
  528. */
  529. #include <YSI\y_malloc>
  530. /*
  531. native
  532. native __y_master__();
  533. native
  534. native
  535. native Master_Caller();
  536. native
  537. native foreign();
  538. native global();
  539. native
  540. */
  541. #include <YSI\y_master>
  542. /*
  543. native
  544. native __y_php__();
  545. native
  546. native
  547. native PHP_SendString(string:name[], string:value[], bool:priority = false);
  548. native PHP_SendFloat(string:name[], Float:value, bool:priority = false);
  549. native PHP_SendBool(string:name[], bool:value, bool:priority = false);
  550. native PHP_SendInt(string:name[], value, bool:priority = false);
  551. native
  552. native phpdata();
  553. native phpfunc();
  554. native
  555. */
  556. // DO NOT include by default!
  557. //#include <YSI\y_php>
  558. /*
  559. native
  560. native __y_playerarray__();
  561. native
  562. native
  563. native PA_Init(PlayerArray:pa<>, bool:init = false, s = bits<MAX_PLAYERS>);
  564. native PA_FastInit(PlayerArray:pa<>);
  565. native PA_Set(PlayerArray:pa<>, slot, bool:set);
  566. native PA_Let(PlayerArray:pa<>, slot);
  567. native PA_Vet(PlayerArray:pa<>, slot);
  568. native PA_Get(PlayerArray:pa<>, slot);
  569. native PA_GetCount(PlayerArray:pa<>);
  570. native Iterator:PA(PlayerArray:pa<>);
  571. native
  572. */
  573. #include <YSI\y_playerarray>
  574. /*
  575. native
  576. native __y_playerset__();
  577. native
  578. native
  579. native Iterator:PS(@PlayerSet:iter);
  580. native
  581. */
  582. #include <YSI\y_playerset>
  583. /*
  584. native
  585. native __y_remote__();
  586. native
  587. native
  588. native remotefunc();
  589. native broadcastfunc();
  590. native localfunc();
  591. native targetfunc();
  592. native
  593. */
  594. #include <YSI\y_remote>
  595. /*
  596. native
  597. native __y_scriptinit__();
  598. native
  599. native
  600. native
  601. */
  602. #include <YSI\y_scriptinit>
  603. /*
  604. native
  605. native __y_stringhash__();
  606. native
  607. native
  608. native YHash(const str[], bool:sensitive = true, e_HASH_TYPE:type = hash_bernstein, len = -1, pack = false);
  609. native
  610. */
  611. #include <YSI\y_stringhash>
  612. /*
  613. native
  614. native __y_svar__();
  615. native
  616. native
  617. native svar();
  618. native
  619. */
  620. #include <YSI\y_svar>
  621. /*
  622. native
  623. native __y_td__();
  624. native
  625. native
  626. native Style:TD_Create(Float:x = 0.0, Float:y = 0.0, Float:letterX = 0.48, Float:letterY = 1.12, Float:textX = 1280.0, Float:textY = 1280.0, colour = 0xE1E1E1FF, boxColour = 0x80808080, bgColour = 0x000000FF, shadow = 2, outline = 0, align = _:td_align_none, font = 1, bool:proportional = false, bool:box = false, time = 0, name[] = "\1");
  627. native TD_Delete(Style:styleId);
  628. native
  629. native Text:TD_Display(text[], Style:id, Float:x = NAN, Float:y = NAN);
  630. native TD_Destroy(Text:textDraw);
  631. native TD_TextPosition(Text:textID, Float:x, Float:y);
  632. native TD_TextXPos(Text:textID, Float:x);
  633. native TD_TextYPos(Text:textID, Float:y);
  634. native TD_SetString(Text:td, text[]);
  635. native
  636. native TD_ShowForPlayer(playerid, Text:textDraw);
  637. native TD_HideForPlayer(playerid, Text:textDraw);
  638. native TD_ShowForAll(Text:textDraw);
  639. native TD_HideForAll(Text:textDraw);
  640. native Text:TD_DisplayForPlayer(playerid, text[], Style:id, Float:x = NAN, Float:y = NAN);
  641. native Text:TD_DisplayForAll(text[], Style:id, Float:x = NAN, Float:y = NAN);
  642. native
  643. native TD_StylePosition(Style:styleID, Float:x, Float:y);
  644. native TD_StyleXPos(Style:styleID, Float:x);
  645. native TD_StyleYPos(Style:styleID, Float:y);
  646. native TD_LetterSize(Style:styleID, Float:x, Float:y);
  647. native TD_LetterX(Style:styleID, Float:x);
  648. native TD_LetterY(Style:styleID, Float:y);
  649. native TD_TextSize(Style:styleID, Float:x, Float:y);
  650. native TD_TextX(Style:styleID, Float:x);
  651. native TD_TextY(Style:styleID, Float:y);
  652. native TD_Alignment(Style:styleID, alignment = _:td_align_none);
  653. native TD_Colour(Style:styleID, colour);
  654. native TD_Color(Style:styleID, color);
  655. native TD_UseBox(Style:styleID, bool:use);
  656. native TD_BoxColour(Style:styleID, colour);
  657. native TD_BoxColor(Style:styleID, color);
  658. native TD_SetShadow(Style:styleID, size);
  659. native TD_SetOutline(Style:styleID, size);
  660. native TD_BackgroundColour(Style:styleID, colour);
  661. native TD_BackgroundColor(Style:styleID, color);
  662. native TD_Font(Style:styleID, font);
  663. native TD_SetProportional(Style:styleID, bool:set);
  664. native TD_SetTime(Style:styleID, time, bool:existing = false);
  665. native
  666. native TD_Morph(Text:textDraw, Style:style, time, delay = 0);
  667. native TD_Link(Text:base, Text:other);
  668. native TD_Unlink(Text:td);
  669. native Style:TD_GetDisplayStyle(Text:td);
  670. native Text:TD_DisplayHashed(text[], hash, Float:x = NAN, Float:y = NAN);
  671. native Text:TD_DisplayHashedForPlayer(playerid, text[], hash, Float:x = NAN, Float:y = NAN);
  672. native Text:TD_DisplayHashedForAll(text[], hash, Float:x = NAN, Float:y = NAN);
  673. native Text:TD_DisplayNamed(text[], style[], Float:x = NAN, Float:y = NAN);
  674. native Text:TD_DisplayNamedForPlayer(playerid, text[], style[], Float:x = NAN, Float:y = NAN);
  675. native Text:TD_DisplayNamedForAll(text[], style[], Float:x = NAN, Float:y = NAN);
  676. native TD_Garbage(Text:textDraw);
  677. native TD_Parse(filename[]);
  678. native
  679. native Style:TD_GetNamed(name[]);
  680. native Style:TD_GetID(hash);
  681. native Style:TD_Clone(Style:styleID, name[] = "\1");
  682. native TD_GetStyleData(Style:styleID, ret[E_TD_DATA]);
  683. native TD_Name(Style:styleID, name[]);
  684. native
  685. */
  686. #include <YSI\y_td>
  687. /*
  688. native
  689. native __y_testing__();
  690. native
  691. native
  692. native Testing_RunAll();
  693. native
  694. */
  695. // DO NOT include by default!
  696. //#include <YSI\y_testing>
  697. /*
  698. native
  699. native __y_text__();
  700. native
  701. native
  702. native Text_Send(@PlayerSet:players, message[], {Float, _}:...);
  703. native
  704. native Text_MessageBox(@PlayerSet:players, using:callback[], title[], text[], button1[], button2[], {Float, _}:...);
  705. native Text_InputBox(@PlayerSet:players, using:callback[], title[], text[], button1[], button2[], {Float, _}:...);
  706. native Text_ListBox(@PlayerSet:players, using:callback[], title[], text[], button1[], button2[], {Float, _}:...);
  707. native Text_PasswordBox(@PlayerSet:players, using:callback[], title[], text[], button1[], button2[], {Float, _}:...);
  708. native Text_DialogBox(@PlayerSet:players, style, using:callback[], title[], text[], button1[], button2[], {Float, _}:...);
  709. native
  710. */
  711. #include <YSI\y_text>
  712. /*
  713. native
  714. native __y_timers__();
  715. native
  716. native
  717. native stop();
  718. native defer();
  719. native repeat();
  720. native timer();
  721. native task();
  722. native ptask();
  723. native pause();
  724. native resume();
  725. native
  726. */
  727. #include <YSI\y_timers>
  728. /*
  729. native
  730. native __y_users__();
  731. native
  732. native
  733. native Language:Player_GetPreloadLanguage(playerid);
  734. native Player_IsRegistered(playerid);
  735. native bool:Player_IsLoggedIn(playerid);
  736. native Player_GetYID(playerid);
  737. native
  738. native Player_RemoveEntry(name[]);
  739. native Player_WriteString(name[], data[]);
  740. native Player_WriteArray(const name[], data[], len);
  741. native Player_WriteInt(name[], data);
  742. native Player_WriteHex(name[], data);
  743. native Player_WriteBin(name[], data);
  744. native Player_WriteBool(name[], bool:data);
  745. native Player_WriteFloat(name[], Float:data, accuracy = 6);
  746. native Player_SetTag(tag[]);
  747. native Player_DeleteTag(tag[]);
  748. native
  749. native Player_TryLogin(playerid, password[]);
  750. native Player_ForceLogin(playerid);
  751. native Player_TryRegister(playerid, password[]);
  752. native Player_ChangePassword(playerid, password[]);
  753. native Player_TryGroup(playerid, other[], password[]);
  754. native Player_ForceGroup(playerid, other[]);
  755. native
  756. native Player_Reload(playerid);
  757. native Player_SetPreload(playerid, data[E_USER_PRELOAD]);
  758. native Player_Preload(name[], ret[E_USER_PRELOAD]);
  759. native
  760. */
  761. #include <YSI\y_users>
  762. /*
  763. native
  764. native __y_utils__();
  765. native
  766. native
  767. native ceildiv(num, denom);
  768. native floordiv(num, denom);
  769. native isnull(str[]);
  770. native isodd(num);
  771. native iseven(num);
  772. native strcpy(dest[], src[], maxlength = sizeof (dest));
  773. native StripNL(str[]);
  774. native endofline(line[], pos);
  775. native chrfind(needle, haystack[], start = 0);
  776. native chrfindp(needle, haystack[], start = 0);
  777. native bernstein(string[]);
  778. native ishex(str[]);
  779. native unpack(const str[]);
  780. native GetIP(playerid);
  781. native getstring(addr);
  782. native getstringarg(addr);
  783. native isnumeric(str[]);
  784. native hexstr(string[]);
  785. native bool:boolstr(string[]);
  786. native binstr(string[]);
  787. native memset(dest[], size = sizeof (dest), val = 0, blocksize = 8);
  788. native ReturnPlayerName(playerid);
  789. native ftouch(const filename[]);
  790. native
  791. */
  792. #include <YSI\y_utils>
  793. /*
  794. native
  795. native __y_uvar__();
  796. native
  797. native
  798. native uvar();
  799. native
  800. */
  801. #include <YSI\y_uvar>
  802. /*
  803. native
  804. native __y_va__();
  805. native
  806. native
  807. native va_printf(fmat[], va_start);
  808. native va_format(out[], size, fmat[], va_start);
  809. native va_strlen(arg);
  810. native va_getstring(dest[], arg, len = sizeof (dest));
  811. native
  812. */
  813. #include <YSI\y_va>
  814. /*
  815. native
  816. native __y_writemem__();
  817. native
  818. native
  819. native WriteMem(addr, value);
  820. native
  821. */
  822. #include <YSI\y_writemem>
  823. /*
  824. native
  825. native __y_xml__();
  826. native
  827. native
  828. native XML:XML_New();
  829. native XML_Destroy(XML:rule);
  830. native
  831. native XML_AddHandler(XML:rule, trigger[], function[]);
  832. native XML_RemoveHandler(XML:rule, trigger[]);
  833. native XML_Parse(XML:rule, filename[]);
  834. native XML_GetKeyValue(key[], value[]);
  835. native
  836. native XMLEntry:XML_AddParameter(XMLEntry:parent, tag[], value[] = "");
  837. native XMLEntry:XML_AddItem(tag[], name[] = "", XMLEntry:parent = XMLEntry:cellmax);
  838. native XMLEntry:XML_CreateEntry(tag[], name[] = "", XMLEntry:parent = XMLEntry:cellmax);
  839. native XMLEntry:XML_AddSubEntry(tag[], name[] = "", XMLEntry:parent = XMLEntry:cellmax);
  840. native XML_WriteItem(filename[], XMLEntry:item, bool:bIncludeXML = true, bool:bFavourShort = false);
  841. native XML_WriteEntry(filename[], XMLEntry:item, bool:bIncludeXML = true, bool:bFavourShort = false);
  842. naitve XML_RemoveItem(file[], tag[], name[]);
  843. naitve XML_ReplaceItem(file[], tag[], name[], replacement);
  844. native
  845. */
  846. #include <YSI\y_xml>
  847. /*
  848. native
  849. native __y_zonepulse__();
  850. native
  851. native
  852. native GangZonePulse(@PlayerSet:players, zone, from, to, time, delay = ZONE_PULSE_STAGE_TIME, time2 = -1, delay2 = -1);
  853. native GangZonePulseForPlayer(playerid, zone, from, to, time, delay = ZONE_PULSE_STAGE_TIME, time2 = -1, delay2 = -1);
  854. native GangZonePulseForAll(zone, from, to, time, delay = ZONE_PULSE_STAGE_TIME, time2 = -1, delay2 = -1);
  855. native GangZoneStopPulse(@PlayerSet:players, zone);
  856. native GangZoneStopPulseForPlayer(playerid, zone);
  857. native GangZoneStopPulseForAll(zone);
  858. native
  859. */
  860. #include <YSI\y_zonepulse>