YSI.inc 28 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022
  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_SetCommand(Group:group, commandid, bool:s);
  363. native Group_SetCommandDefault(Group:group, bool:s);
  364. native Group_SetGlobalCommand(commandid, bool:s);
  365. native Group_SetGlobalCommandDefault(bool:s);
  366. native
  367. native Group_SetArea(Group:group, area, bool:s);
  368. native Group_SetAreaDefault(Group:group, bool:s);
  369. native Group_SetGlobalArea(area, bool:s);
  370. native Group_SetGlobalAreaDefault(bool:s);
  371. native
  372. native Group_SetClass(Group:group, class, bool:s);
  373. native Group_SetClassDefault(Group:group, bool:s);
  374. native Group_SetGlobalClass(class, bool:s);
  375. native Group_SetGlobalCalssDefault(bool:s);
  376. native
  377. native Iterator:PlayerGroups(playerid)
  378. native Iterator:Group(Group:group)
  379. native
  380. native Group:Group_SetBalanced(playerid, Group:...)
  381. native Group_GetColour(Group:group);
  382. native Group_GetColor(Group:group);
  383. native Group_SetColour(Group:group, colour);
  384. native Group_SetColor(Group:group, color);
  385. native bool:Group_GetGang(Group:group);
  386. native Group_SetGang(Group:group, bool:set);
  387. native Group:Group_GetID(name[]);
  388. native Group_GetName(Group:group);
  389. native Group_SetName(Group:group, name[]);
  390. native
  391. */
  392. #include <YSI\y_groups>
  393. /*
  394. native
  395. native __y_hooks__();
  396. native
  397. native
  398. native hook();
  399. native
  400. */
  401. // Is included as then they can use hooks straight off.
  402. #include <YSI\y_hooks>
  403. /*
  404. native
  405. native __y_ini__();
  406. native
  407. native
  408. native bool:INI_ParseFile(fname[], remoteFormat[], bool:bFileFirst = false, bool:bExtra = false, extra = 0, bool:bLocal = true, bool:bPassTag = false, bool:bFilter = true, filter[] = "")
  409. native bool:INI_Load(filename[], bool:bExtra = false, extra = 0, bool:bLocal = true)
  410. native
  411. native INI_Int(name[], &dest);
  412. native INI_Float(name[], &Float:dest);
  413. native INI_Hex(name[], &dest);
  414. native INI_Bin(name[], &dest);
  415. native INI_String(name[], dest[], size);
  416. native
  417. native INI:INI_Open(filename[])
  418. native INI_Close(INI:file)
  419. native
  420. native INI_SetTag(INI:file, tag[])
  421. native INI_DeleteTag(INI:file, tag[])
  422. native INI_WriteArray(INI:file, const name[], data[], len)
  423. native INI_RemoveEntry(INI:file, name[])
  424. native INI_WriteString(INI:file, name[], data[])
  425. native INI_WriteInt(INI:file, name[], data)
  426. native INI_WriteHex(INI:file, name[], data)
  427. native INI_WriteBin(INI:file, name[], data)
  428. native INI_WriteBool(INI:file, name[], bool:data)
  429. native INI_WriteFloat(INI:file, name[], Float:data, accuracy = 6)
  430. native
  431. */
  432. #include <YSI\y_ini>
  433. /*
  434. native
  435. native __y_inline__();
  436. native
  437. native
  438. native using();
  439. native inline();
  440. native
  441. native Callback_Get(callback:name, result[E_CALLBACK_DATA], expect = -1);
  442. native Callback_Release(const input[E_CALLBACK_DATA]);
  443. native Callback_Call(const input[E_CALLBACK_DATA], {Float, _}:...);
  444. native
  445. */
  446. #include <YSI\y_inline>
  447. /*
  448. native
  449. native __y_iterate__();
  450. native
  451. native
  452. native Iter_Init(Iterator:arr[]<>);
  453. native Iter_Add(Iterator:iter<>, element);
  454. native Iter_Remove(Iterator:iter<>, element);
  455. native Iter_Contains(Iterator:iter<>, element);
  456. native Iter_SafeRemove(Iterator:iter<>, element, &ret);
  457. native Iter_Random(Iterator:iter<>);
  458. native Iter_Count(Iterator:iter<>);
  459. native Iter_Clear(Iterator:iter<>);
  460. native Iter_Free(Iterator:iter<>);
  461. native
  462. native foreach();
  463. native
  464. native Iter_Begin(Iterator:iter<>);
  465. native Iter_End(Iterator:iter<>);
  466. native Iter_First(Iterator:iter<>);
  467. native Iter_Last(Iterator:iter<>);
  468. native Iter_Next(Iterator:iter<>, cur);
  469. native Iter_Prev(Iterator:iter<>, cur);
  470. native
  471. */
  472. #include <YSI\y_iterate>
  473. /*
  474. native
  475. native __y_languages__();
  476. native
  477. native
  478. native Language:Langs_Add(code[], name[]);
  479. native Language:Langs_SetPlayerLanguage(playerid, Language:l);
  480. native Language:Langs_GetPlayerLanguage(playerid);
  481. native
  482. native Language:Langs_AddLanguage(code[], name[]);
  483. native Langs_RemoveLanguage(Language:l);
  484. native Language:Langs_GetLanguage(identifier[]);
  485. native Language:Langs_GetLanguageCount();
  486. native Langs_GetLanguageCodes();
  487. native Langs_GetName(Language:l);
  488. native Langs_GetCode(Language:l);
  489. native bool:Langs_IsValid(Language:l);
  490. native Language:Langs_SetPlayerCode(playerid, code[]);
  491. native
  492. */
  493. #include <YSI\y_languages>
  494. /*
  495. native
  496. native __y_lock__();
  497. native
  498. native
  499. native
  500. */
  501. // DO NOT include by default!
  502. //#include <YSI\y_lock>
  503. /*
  504. native
  505. native __y_malloc__();
  506. native
  507. native
  508. native Alloc:malloc(size);
  509. native Alloc:calloc(size);
  510. native free(Alloc:slot);
  511. native
  512. native mget(Alloc:array, index);
  513. native mset(Alloc:array, index, value);
  514. native mgets(target[], length, Alloc:array, index);
  515. native msets(Alloc:array, index, const str[]);
  516. native
  517. native Malloc_SlotSize(Alloc:array);
  518. native Malloc_Get(Alloc:array, index);
  519. native Malloc_Set(Alloc:array, index, value);
  520. native Malloc_GetS(target[], length, Alloc:array, index);
  521. native Malloc_SetS(Alloc:array, index, const str[]);
  522. native Malloc_GetA(target[], length, Alloc:array, index);
  523. native Malloc_SetA(Alloc:array, index, const arr[], len);
  524. native
  525. */
  526. #include <YSI\y_malloc>
  527. /*
  528. native
  529. native __y_master__();
  530. native
  531. native
  532. native Master_Caller();
  533. native
  534. native foreign();
  535. native global();
  536. native
  537. */
  538. #include <YSI\y_master>
  539. /*
  540. native
  541. native __y_php__();
  542. native
  543. native
  544. native PHP_SendString(string:name[], string:value[], bool:priority = false);
  545. native PHP_SendFloat(string:name[], Float:value, bool:priority = false);
  546. native PHP_SendBool(string:name[], bool:value, bool:priority = false);
  547. native PHP_SendInt(string:name[], value, bool:priority = false);
  548. native
  549. native phpdata();
  550. native phpfunc();
  551. native
  552. */
  553. // DO NOT include by default!
  554. //#include <YSI\y_php>
  555. /*
  556. native
  557. native __y_playerarray__();
  558. native
  559. native
  560. native PA_Init(PlayerArray:pa<>, bool:init = false, s = bits<MAX_PLAYERS>);
  561. native PA_FastInit(PlayerArray:pa<>);
  562. native PA_Set(PlayerArray:pa<>, slot, bool:set);
  563. native PA_Let(PlayerArray:pa<>, slot);
  564. native PA_Vet(PlayerArray:pa<>, slot);
  565. native PA_Get(PlayerArray:pa<>, slot);
  566. native PA_GetCount(PlayerArray:pa<>);
  567. native Iterator:PA(PlayerArray:pa<>);
  568. native
  569. */
  570. #include <YSI\y_playerarray>
  571. /*
  572. native
  573. native __y_playerset__();
  574. native
  575. native
  576. native Iterator:PS(@PlayerSet:iter);
  577. native
  578. */
  579. #include <YSI\y_playerset>
  580. /*
  581. native
  582. native __y_remote__();
  583. native
  584. native
  585. native remotefunc();
  586. native broadcastfunc();
  587. native localfunc();
  588. native targetfunc();
  589. native
  590. */
  591. #include <YSI\y_remote>
  592. /*
  593. native
  594. native __y_scriptinit__();
  595. native
  596. native
  597. native
  598. */
  599. #include <YSI\y_scriptinit>
  600. /*
  601. native
  602. native __y_stringhash__();
  603. native
  604. native
  605. native YHash(const str[], bool:sensitive = true, e_HASH_TYPE:type = hash_bernstein, len = -1, pack = false);
  606. native
  607. */
  608. #include <YSI\y_stringhash>
  609. /*
  610. native
  611. native __y_svar__();
  612. native
  613. native
  614. native svar();
  615. native
  616. */
  617. #include <YSI\y_svar>
  618. /*
  619. native
  620. native __y_td__();
  621. native
  622. native
  623. 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");
  624. native TD_Delete(Style:styleId);
  625. native
  626. native Text:TD_Display(text[], Style:id, Float:x = NAN, Float:y = NAN);
  627. native TD_Destroy(Text:textDraw);
  628. native TD_TextPosition(Text:textID, Float:x, Float:y);
  629. native TD_TextXPos(Text:textID, Float:x);
  630. native TD_TextYPos(Text:textID, Float:y);
  631. native TD_SetString(Text:td, text[]);
  632. native
  633. native TD_ShowForPlayer(playerid, Text:textDraw);
  634. native TD_HideForPlayer(playerid, Text:textDraw);
  635. native TD_ShowForAll(Text:textDraw);
  636. native TD_HideForAll(Text:textDraw);
  637. native Text:TD_DisplayForPlayer(playerid, text[], Style:id, Float:x = NAN, Float:y = NAN);
  638. native Text:TD_DisplayForAll(text[], Style:id, Float:x = NAN, Float:y = NAN);
  639. native
  640. native TD_StylePosition(Style:styleID, Float:x, Float:y);
  641. native TD_StyleXPos(Style:styleID, Float:x);
  642. native TD_StyleYPos(Style:styleID, Float:y);
  643. native TD_LetterSize(Style:styleID, Float:x, Float:y);
  644. native TD_LetterX(Style:styleID, Float:x);
  645. native TD_LetterY(Style:styleID, Float:y);
  646. native TD_TextSize(Style:styleID, Float:x, Float:y);
  647. native TD_TextX(Style:styleID, Float:x);
  648. native TD_TextY(Style:styleID, Float:y);
  649. native TD_Alignment(Style:styleID, alignment = _:td_align_none);
  650. native TD_Colour(Style:styleID, colour);
  651. native TD_Color(Style:styleID, color);
  652. native TD_UseBox(Style:styleID, bool:use);
  653. native TD_BoxColour(Style:styleID, colour);
  654. native TD_BoxColor(Style:styleID, color);
  655. native TD_SetShadow(Style:styleID, size);
  656. native TD_SetOutline(Style:styleID, size);
  657. native TD_BackgroundColour(Style:styleID, colour);
  658. native TD_BackgroundColor(Style:styleID, color);
  659. native TD_Font(Style:styleID, font);
  660. native TD_SetProportional(Style:styleID, bool:set);
  661. native TD_SetTime(Style:styleID, time, bool:existing = false);
  662. native
  663. native TD_Morph(Text:textDraw, Style:style, time, delay = 0);
  664. native TD_Link(Text:base, Text:other);
  665. native TD_Unlink(Text:td);
  666. native Style:TD_GetDisplayStyle(Text:td);
  667. native Text:TD_DisplayHashed(text[], hash, Float:x = NAN, Float:y = NAN);
  668. native Text:TD_DisplayHashedForPlayer(playerid, text[], hash, Float:x = NAN, Float:y = NAN);
  669. native Text:TD_DisplayHashedForAll(text[], hash, Float:x = NAN, Float:y = NAN);
  670. native Text:TD_DisplayNamed(text[], style[], Float:x = NAN, Float:y = NAN);
  671. native Text:TD_DisplayNamedForPlayer(playerid, text[], style[], Float:x = NAN, Float:y = NAN);
  672. native Text:TD_DisplayNamedForAll(text[], style[], Float:x = NAN, Float:y = NAN);
  673. native TD_Garbage(Text:textDraw);
  674. native TD_Parse(filename[]);
  675. native
  676. native Style:TD_GetNamed(name[]);
  677. native Style:TD_GetID(hash);
  678. native Style:TD_Clone(Style:styleID, name[] = "\1");
  679. native TD_GetStyleData(Style:styleID, ret[E_TD_DATA]);
  680. native TD_Name(Style:styleID, name[]);
  681. native
  682. */
  683. #include <YSI\y_td>
  684. /*
  685. native
  686. native __y_testing__();
  687. native
  688. native
  689. native Testing_RunAll();
  690. native
  691. */
  692. // DO NOT include by default!
  693. //#include <YSI\y_testing>
  694. /*
  695. native
  696. native __y_text__();
  697. native
  698. native
  699. native Text_Send(@PlayerSet:players, message[], {Float, _}:...);
  700. native
  701. native Text_MessageBox(@PlayerSet:players, using:callback[], title[], text[], button1[], button2[], {Float, _}:...);
  702. native Text_InputBox(@PlayerSet:players, using:callback[], title[], text[], button1[], button2[], {Float, _}:...);
  703. native Text_ListBox(@PlayerSet:players, using:callback[], title[], text[], button1[], button2[], {Float, _}:...);
  704. native Text_PasswordBox(@PlayerSet:players, using:callback[], title[], text[], button1[], button2[], {Float, _}:...);
  705. native Text_DialogBox(@PlayerSet:players, style, using:callback[], title[], text[], button1[], button2[], {Float, _}:...);
  706. native
  707. */
  708. #include <YSI\y_text>
  709. /*
  710. native
  711. native __y_timers__();
  712. native
  713. native
  714. native stop();
  715. native defer();
  716. native repeat();
  717. native timer();
  718. native task();
  719. native ptask();
  720. native pause();
  721. native resume();
  722. native
  723. */
  724. #include <YSI\y_timers>
  725. /*
  726. native
  727. native __y_users__();
  728. native
  729. native
  730. native Language:Player_GetPreloadLanguage(playerid);
  731. native Player_IsRegistered(playerid);
  732. native bool:Player_IsLoggedIn(playerid);
  733. native Player_GetYID(playerid);
  734. native
  735. native Player_RemoveEntry(name[]);
  736. native Player_WriteString(name[], data[]);
  737. native Player_WriteArray(const name[], data[], len);
  738. native Player_WriteInt(name[], data);
  739. native Player_WriteHex(name[], data);
  740. native Player_WriteBin(name[], data);
  741. native Player_WriteBool(name[], bool:data);
  742. native Player_WriteFloat(name[], Float:data, accuracy = 6);
  743. native Player_SetTag(tag[]);
  744. native Player_DeleteTag(tag[]);
  745. native
  746. native Player_TryLogin(playerid, password[]);
  747. native Player_ForceLogin(playerid);
  748. native Player_TryRegister(playerid, password[]);
  749. native Player_ChangePassword(playerid, password[]);
  750. native Player_TryGroup(playerid, other[], password[]);
  751. native Player_ForceGroup(playerid, other[]);
  752. native
  753. native Player_Reload(playerid);
  754. native Player_SetPreload(playerid, data[E_USER_PRELOAD]);
  755. native Player_Preload(name[], ret[E_USER_PRELOAD]);
  756. native
  757. */
  758. #include <YSI\y_users>
  759. /*
  760. native
  761. native __y_utils__();
  762. native
  763. native
  764. native ceildiv(num, denom);
  765. native floordiv(num, denom);
  766. native isnull(str[]);
  767. native isodd(num);
  768. native iseven(num);
  769. native strcpy(dest[], src[], maxlength = sizeof (dest));
  770. native StripNL(str[]);
  771. native endofline(line[], pos);
  772. native chrfind(needle, haystack[], start = 0);
  773. native chrfindp(needle, haystack[], start = 0);
  774. native bernstein(string[]);
  775. native ishex(str[]);
  776. native unpack(const str[]);
  777. native GetIP(playerid);
  778. native getstring(addr);
  779. native getstringarg(addr);
  780. native isnumeric(str[]);
  781. native hexstr(string[]);
  782. native bool:boolstr(string[]);
  783. native binstr(string[]);
  784. native memset(dest[], size = sizeof (dest), val = 0, blocksize = 8);
  785. native ReturnPlayerName(playerid);
  786. native ftouch(const filename[]);
  787. native
  788. */
  789. #include <YSI\y_utils>
  790. /*
  791. native
  792. native __y_uvar__();
  793. native
  794. native
  795. native uvar();
  796. native
  797. */
  798. #include <YSI\y_uvar>
  799. /*
  800. native
  801. native __y_va__();
  802. native
  803. native
  804. native va_printf(fmat[], va_start);
  805. native va_format(out[], size, fmat[], va_start);
  806. native va_strlen(arg);
  807. native va_getstring(dest[], arg, len = sizeof (dest));
  808. native
  809. */
  810. #include <YSI\y_va>
  811. /*
  812. native
  813. native __y_writemem__();
  814. native
  815. native
  816. native WriteMem(addr, value);
  817. native
  818. */
  819. #include <YSI\y_writemem>
  820. /*
  821. native
  822. native __y_xml__();
  823. native
  824. native
  825. native XML:XML_New();
  826. native XML_Destroy(XML:rule);
  827. native
  828. native XML_AddHandler(XML:rule, trigger[], function[]);
  829. native XML_RemoveHandler(XML:rule, trigger[]);
  830. native XML_Parse(XML:rule, filename[]);
  831. native XML_GetKeyValue(key[], value[]);
  832. native
  833. native XMLEntry:XML_AddParameter(XMLEntry:parent, tag[], value[] = "");
  834. native XMLEntry:XML_AddItem(tag[], name[] = "", XMLEntry:parent = XMLEntry:cellmax);
  835. native XMLEntry:XML_CreateEntry(tag[], name[] = "", XMLEntry:parent = XMLEntry:cellmax);
  836. native XMLEntry:XML_AddSubEntry(tag[], name[] = "", XMLEntry:parent = XMLEntry:cellmax);
  837. native XML_WriteItem(filename[], XMLEntry:item, bool:bIncludeXML = true, bool:bFavourShort = false);
  838. native XML_WriteEntry(filename[], XMLEntry:item, bool:bIncludeXML = true, bool:bFavourShort = false);
  839. naitve XML_RemoveItem(file[], tag[], name[]);
  840. naitve XML_ReplaceItem(file[], tag[], name[], replacement);
  841. native
  842. */
  843. #include <YSI\y_xml>
  844. /*
  845. native
  846. native __y_zonepulse__();
  847. native
  848. native
  849. native GangZonePulse(@PlayerSet:players, zone, from, to, time, delay = ZONE_PULSE_STAGE_TIME, time2 = -1, delay2 = -1);
  850. native GangZonePulseForPlayer(playerid, zone, from, to, time, delay = ZONE_PULSE_STAGE_TIME, time2 = -1, delay2 = -1);
  851. native GangZonePulseForAll(zone, from, to, time, delay = ZONE_PULSE_STAGE_TIME, time2 = -1, delay2 = -1);
  852. native GangZoneStopPulse(@PlayerSet:players, zone);
  853. native GangZoneStopPulseForPlayer(playerid, zone);
  854. native GangZoneStopPulseForAll(zone);
  855. native
  856. */
  857. #include <YSI\y_zonepulse>