_sourcemod_builtins.py 26 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151
  1. """
  2. pygments.lexers._sourcemod_builtins
  3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  4. This file contains the names of SourceMod functions.
  5. Do not edit the FUNCTIONS list by hand.
  6. Run with `python -I` to regenerate.
  7. :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
  8. :license: BSD, see LICENSE for details.
  9. """
  10. FUNCTIONS = (
  11. 'OnEntityCreated',
  12. 'OnEntityDestroyed',
  13. 'OnGetGameDescription',
  14. 'OnLevelInit',
  15. 'SDKHook',
  16. 'SDKHookEx',
  17. 'SDKUnhook',
  18. 'SDKHooks_TakeDamage',
  19. 'SDKHooks_DropWeapon',
  20. 'TopMenuHandler',
  21. 'CreateTopMenu',
  22. 'LoadTopMenuConfig',
  23. 'AddToTopMenu',
  24. 'GetTopMenuInfoString',
  25. 'GetTopMenuObjName',
  26. 'RemoveFromTopMenu',
  27. 'DisplayTopMenu',
  28. 'DisplayTopMenuCategory',
  29. 'FindTopMenuCategory',
  30. 'SetTopMenuTitleCaching',
  31. 'OnAdminMenuCreated',
  32. 'OnAdminMenuReady',
  33. 'GetAdminTopMenu',
  34. 'AddTargetsToMenu',
  35. 'AddTargetsToMenu2',
  36. 'RedisplayAdminMenu',
  37. 'TEHook',
  38. 'AddTempEntHook',
  39. 'RemoveTempEntHook',
  40. 'TE_Start',
  41. 'TE_IsValidProp',
  42. 'TE_WriteNum',
  43. 'TE_ReadNum',
  44. 'TE_WriteFloat',
  45. 'TE_ReadFloat',
  46. 'TE_WriteVector',
  47. 'TE_ReadVector',
  48. 'TE_WriteAngles',
  49. 'TE_WriteFloatArray',
  50. 'TE_Send',
  51. 'TE_WriteEncodedEnt',
  52. 'TE_SendToAll',
  53. 'TE_SendToClient',
  54. 'CreateKeyValues',
  55. 'KvSetString',
  56. 'KvSetNum',
  57. 'KvSetUInt64',
  58. 'KvSetFloat',
  59. 'KvSetColor',
  60. 'KvSetVector',
  61. 'KvGetString',
  62. 'KvGetNum',
  63. 'KvGetFloat',
  64. 'KvGetColor',
  65. 'KvGetUInt64',
  66. 'KvGetVector',
  67. 'KvJumpToKey',
  68. 'KvJumpToKeySymbol',
  69. 'KvGotoFirstSubKey',
  70. 'KvGotoNextKey',
  71. 'KvSavePosition',
  72. 'KvDeleteKey',
  73. 'KvDeleteThis',
  74. 'KvGoBack',
  75. 'KvRewind',
  76. 'KvGetSectionName',
  77. 'KvSetSectionName',
  78. 'KvGetDataType',
  79. 'KeyValuesToFile',
  80. 'FileToKeyValues',
  81. 'StringToKeyValues',
  82. 'KvSetEscapeSequences',
  83. 'KvNodesInStack',
  84. 'KvCopySubkeys',
  85. 'KvFindKeyById',
  86. 'KvGetNameSymbol',
  87. 'KvGetSectionSymbol',
  88. 'TE_SetupSparks',
  89. 'TE_SetupSmoke',
  90. 'TE_SetupDust',
  91. 'TE_SetupMuzzleFlash',
  92. 'TE_SetupMetalSparks',
  93. 'TE_SetupEnergySplash',
  94. 'TE_SetupArmorRicochet',
  95. 'TE_SetupGlowSprite',
  96. 'TE_SetupExplosion',
  97. 'TE_SetupBloodSprite',
  98. 'TE_SetupBeamRingPoint',
  99. 'TE_SetupBeamPoints',
  100. 'TE_SetupBeamLaser',
  101. 'TE_SetupBeamRing',
  102. 'TE_SetupBeamFollow',
  103. 'HookEvent',
  104. 'HookEventEx',
  105. 'UnhookEvent',
  106. 'CreateEvent',
  107. 'FireEvent',
  108. 'CancelCreatedEvent',
  109. 'GetEventBool',
  110. 'SetEventBool',
  111. 'GetEventInt',
  112. 'SetEventInt',
  113. 'GetEventFloat',
  114. 'SetEventFloat',
  115. 'GetEventString',
  116. 'SetEventString',
  117. 'GetEventName',
  118. 'SetEventBroadcast',
  119. 'GetUserMessageType',
  120. 'GetUserMessageId',
  121. 'GetUserMessageName',
  122. 'StartMessage',
  123. 'StartMessageEx',
  124. 'EndMessage',
  125. 'MsgHook',
  126. 'MsgPostHook',
  127. 'HookUserMessage',
  128. 'UnhookUserMessage',
  129. 'StartMessageAll',
  130. 'StartMessageOne',
  131. 'InactivateClient',
  132. 'ReconnectClient',
  133. 'GetMaxEntities',
  134. 'GetEntityCount',
  135. 'IsValidEntity',
  136. 'IsValidEdict',
  137. 'IsEntNetworkable',
  138. 'CreateEdict',
  139. 'RemoveEdict',
  140. 'GetEdictFlags',
  141. 'SetEdictFlags',
  142. 'GetEdictClassname',
  143. 'GetEntityNetClass',
  144. 'ChangeEdictState',
  145. 'GetEntData',
  146. 'SetEntData',
  147. 'GetEntDataFloat',
  148. 'SetEntDataFloat',
  149. 'GetEntDataEnt2',
  150. 'SetEntDataEnt2',
  151. 'GetEntDataVector',
  152. 'SetEntDataVector',
  153. 'GetEntDataString',
  154. 'SetEntDataString',
  155. 'FindSendPropOffs',
  156. 'FindSendPropInfo',
  157. 'FindDataMapOffs',
  158. 'FindDataMapInfo',
  159. 'GetEntSendPropOffs',
  160. 'GetEntProp',
  161. 'SetEntProp',
  162. 'GetEntPropFloat',
  163. 'SetEntPropFloat',
  164. 'GetEntPropEnt',
  165. 'SetEntPropEnt',
  166. 'GetEntPropVector',
  167. 'SetEntPropVector',
  168. 'GetEntPropString',
  169. 'SetEntPropString',
  170. 'GetEntPropArraySize',
  171. 'GetEntDataArray',
  172. 'SetEntDataArray',
  173. 'GetEntityAddress',
  174. 'GetEntityClassname',
  175. 'float',
  176. 'FloatMul',
  177. 'FloatDiv',
  178. 'FloatAdd',
  179. 'FloatSub',
  180. 'FloatFraction',
  181. 'RoundToZero',
  182. 'RoundToCeil',
  183. 'RoundToFloor',
  184. 'RoundToNearest',
  185. 'FloatCompare',
  186. 'SquareRoot',
  187. 'Pow',
  188. 'Exponential',
  189. 'Logarithm',
  190. 'Sine',
  191. 'Cosine',
  192. 'Tangent',
  193. 'FloatAbs',
  194. 'ArcTangent',
  195. 'ArcCosine',
  196. 'ArcSine',
  197. 'ArcTangent2',
  198. 'RoundFloat',
  199. 'operator%',
  200. 'DegToRad',
  201. 'RadToDeg',
  202. 'GetURandomInt',
  203. 'GetURandomFloat',
  204. 'SetURandomSeed',
  205. 'SetURandomSeedSimple',
  206. 'RemovePlayerItem',
  207. 'GivePlayerItem',
  208. 'GetPlayerWeaponSlot',
  209. 'IgniteEntity',
  210. 'ExtinguishEntity',
  211. 'TeleportEntity',
  212. 'ForcePlayerSuicide',
  213. 'SlapPlayer',
  214. 'FindEntityByClassname',
  215. 'GetClientEyeAngles',
  216. 'CreateEntityByName',
  217. 'DispatchSpawn',
  218. 'DispatchKeyValue',
  219. 'DispatchKeyValueFloat',
  220. 'DispatchKeyValueVector',
  221. 'GetClientAimTarget',
  222. 'GetTeamCount',
  223. 'GetTeamName',
  224. 'GetTeamScore',
  225. 'SetTeamScore',
  226. 'GetTeamClientCount',
  227. 'SetEntityModel',
  228. 'GetPlayerDecalFile',
  229. 'GetPlayerJingleFile',
  230. 'GetServerNetStats',
  231. 'EquipPlayerWeapon',
  232. 'ActivateEntity',
  233. 'SetClientInfo',
  234. 'GivePlayerAmmo',
  235. 'SetClientListeningFlags',
  236. 'GetClientListeningFlags',
  237. 'SetListenOverride',
  238. 'GetListenOverride',
  239. 'IsClientMuted',
  240. 'TR_GetPointContents',
  241. 'TR_GetPointContentsEnt',
  242. 'TR_TraceRay',
  243. 'TR_TraceHull',
  244. 'TR_TraceRayFilter',
  245. 'TR_TraceHullFilter',
  246. 'TR_TraceRayEx',
  247. 'TR_TraceHullEx',
  248. 'TR_TraceRayFilterEx',
  249. 'TR_TraceHullFilterEx',
  250. 'TR_GetFraction',
  251. 'TR_GetEndPosition',
  252. 'TR_GetEntityIndex',
  253. 'TR_DidHit',
  254. 'TR_GetHitGroup',
  255. 'TR_GetPlaneNormal',
  256. 'TR_PointOutsideWorld',
  257. 'SortIntegers',
  258. 'SortFloats',
  259. 'SortStrings',
  260. 'SortFunc1D',
  261. 'SortCustom1D',
  262. 'SortCustom2D',
  263. 'SortADTArray',
  264. 'SortFuncADTArray',
  265. 'SortADTArrayCustom',
  266. 'CompileRegex',
  267. 'MatchRegex',
  268. 'GetRegexSubString',
  269. 'SimpleRegexMatch',
  270. 'TF2_GetPlayerClass',
  271. 'TF2_SetPlayerClass',
  272. 'TF2_RemoveWeaponSlot',
  273. 'TF2_RemoveAllWeapons',
  274. 'TF2_IsPlayerInCondition',
  275. 'TF2_GetObjectType',
  276. 'TF2_GetObjectMode',
  277. 'NominateMap',
  278. 'RemoveNominationByMap',
  279. 'RemoveNominationByOwner',
  280. 'GetExcludeMapList',
  281. 'GetNominatedMapList',
  282. 'CanMapChooserStartVote',
  283. 'InitiateMapChooserVote',
  284. 'HasEndOfMapVoteFinished',
  285. 'EndOfMapVoteEnabled',
  286. 'OnNominationRemoved',
  287. 'OnMapVoteStarted',
  288. 'CreateTimer',
  289. 'KillTimer',
  290. 'TriggerTimer',
  291. 'GetTickedTime',
  292. 'GetMapTimeLeft',
  293. 'GetMapTimeLimit',
  294. 'ExtendMapTimeLimit',
  295. 'GetTickInterval',
  296. 'OnMapTimeLeftChanged',
  297. 'IsServerProcessing',
  298. 'CreateDataTimer',
  299. 'ByteCountToCells',
  300. 'CreateArray',
  301. 'ClearArray',
  302. 'CloneArray',
  303. 'ResizeArray',
  304. 'GetArraySize',
  305. 'PushArrayCell',
  306. 'PushArrayString',
  307. 'PushArrayArray',
  308. 'GetArrayCell',
  309. 'GetArrayString',
  310. 'GetArrayArray',
  311. 'SetArrayCell',
  312. 'SetArrayString',
  313. 'SetArrayArray',
  314. 'ShiftArrayUp',
  315. 'RemoveFromArray',
  316. 'SwapArrayItems',
  317. 'FindStringInArray',
  318. 'FindValueInArray',
  319. 'ProcessTargetString',
  320. 'ReplyToTargetError',
  321. 'MultiTargetFilter',
  322. 'AddMultiTargetFilter',
  323. 'RemoveMultiTargetFilter',
  324. 'OnBanClient',
  325. 'OnBanIdentity',
  326. 'OnRemoveBan',
  327. 'BanClient',
  328. 'BanIdentity',
  329. 'RemoveBan',
  330. 'CreateTrie',
  331. 'SetTrieValue',
  332. 'SetTrieArray',
  333. 'SetTrieString',
  334. 'GetTrieValue',
  335. 'GetTrieArray',
  336. 'GetTrieString',
  337. 'RemoveFromTrie',
  338. 'ClearTrie',
  339. 'GetTrieSize',
  340. 'GetFunctionByName',
  341. 'CreateGlobalForward',
  342. 'CreateForward',
  343. 'GetForwardFunctionCount',
  344. 'AddToForward',
  345. 'RemoveFromForward',
  346. 'RemoveAllFromForward',
  347. 'Call_StartForward',
  348. 'Call_StartFunction',
  349. 'Call_PushCell',
  350. 'Call_PushCellRef',
  351. 'Call_PushFloat',
  352. 'Call_PushFloatRef',
  353. 'Call_PushArray',
  354. 'Call_PushArrayEx',
  355. 'Call_PushString',
  356. 'Call_PushStringEx',
  357. 'Call_Finish',
  358. 'Call_Cancel',
  359. 'NativeCall',
  360. 'CreateNative',
  361. 'ThrowNativeError',
  362. 'GetNativeStringLength',
  363. 'GetNativeString',
  364. 'SetNativeString',
  365. 'GetNativeCell',
  366. 'GetNativeCellRef',
  367. 'SetNativeCellRef',
  368. 'GetNativeArray',
  369. 'SetNativeArray',
  370. 'FormatNativeString',
  371. 'RequestFrameCallback',
  372. 'RequestFrame',
  373. 'OnRebuildAdminCache',
  374. 'DumpAdminCache',
  375. 'AddCommandOverride',
  376. 'GetCommandOverride',
  377. 'UnsetCommandOverride',
  378. 'CreateAdmGroup',
  379. 'FindAdmGroup',
  380. 'SetAdmGroupAddFlag',
  381. 'GetAdmGroupAddFlag',
  382. 'GetAdmGroupAddFlags',
  383. 'SetAdmGroupImmuneFrom',
  384. 'GetAdmGroupImmuneCount',
  385. 'GetAdmGroupImmuneFrom',
  386. 'AddAdmGroupCmdOverride',
  387. 'GetAdmGroupCmdOverride',
  388. 'RegisterAuthIdentType',
  389. 'CreateAdmin',
  390. 'GetAdminUsername',
  391. 'BindAdminIdentity',
  392. 'SetAdminFlag',
  393. 'GetAdminFlag',
  394. 'GetAdminFlags',
  395. 'AdminInheritGroup',
  396. 'GetAdminGroupCount',
  397. 'GetAdminGroup',
  398. 'SetAdminPassword',
  399. 'GetAdminPassword',
  400. 'FindAdminByIdentity',
  401. 'RemoveAdmin',
  402. 'FlagBitsToBitArray',
  403. 'FlagBitArrayToBits',
  404. 'FlagArrayToBits',
  405. 'FlagBitsToArray',
  406. 'FindFlagByName',
  407. 'FindFlagByChar',
  408. 'FindFlagChar',
  409. 'ReadFlagString',
  410. 'CanAdminTarget',
  411. 'CreateAuthMethod',
  412. 'SetAdmGroupImmunityLevel',
  413. 'GetAdmGroupImmunityLevel',
  414. 'SetAdminImmunityLevel',
  415. 'GetAdminImmunityLevel',
  416. 'FlagToBit',
  417. 'BitToFlag',
  418. 'ServerCommand',
  419. 'ServerCommandEx',
  420. 'InsertServerCommand',
  421. 'ServerExecute',
  422. 'ClientCommand',
  423. 'FakeClientCommand',
  424. 'FakeClientCommandEx',
  425. 'PrintToServer',
  426. 'PrintToConsole',
  427. 'ReplyToCommand',
  428. 'GetCmdReplySource',
  429. 'SetCmdReplySource',
  430. 'IsChatTrigger',
  431. 'ShowActivity2',
  432. 'ShowActivity',
  433. 'ShowActivityEx',
  434. 'FormatActivitySource',
  435. 'SrvCmd',
  436. 'RegServerCmd',
  437. 'ConCmd',
  438. 'RegConsoleCmd',
  439. 'RegAdminCmd',
  440. 'GetCmdArgs',
  441. 'GetCmdArg',
  442. 'GetCmdArgString',
  443. 'CreateConVar',
  444. 'FindConVar',
  445. 'ConVarChanged',
  446. 'HookConVarChange',
  447. 'UnhookConVarChange',
  448. 'GetConVarBool',
  449. 'SetConVarBool',
  450. 'GetConVarInt',
  451. 'SetConVarInt',
  452. 'GetConVarFloat',
  453. 'SetConVarFloat',
  454. 'GetConVarString',
  455. 'SetConVarString',
  456. 'ResetConVar',
  457. 'GetConVarDefault',
  458. 'GetConVarFlags',
  459. 'SetConVarFlags',
  460. 'GetConVarBounds',
  461. 'SetConVarBounds',
  462. 'GetConVarName',
  463. 'QueryClientConVar',
  464. 'GetCommandIterator',
  465. 'ReadCommandIterator',
  466. 'CheckCommandAccess',
  467. 'CheckAccess',
  468. 'IsValidConVarChar',
  469. 'GetCommandFlags',
  470. 'SetCommandFlags',
  471. 'FindFirstConCommand',
  472. 'FindNextConCommand',
  473. 'SendConVarValue',
  474. 'AddServerTag',
  475. 'RemoveServerTag',
  476. 'CommandListener',
  477. 'AddCommandListener',
  478. 'RemoveCommandListener',
  479. 'CommandExists',
  480. 'OnClientSayCommand',
  481. 'OnClientSayCommand_Post',
  482. 'TF2_IgnitePlayer',
  483. 'TF2_RespawnPlayer',
  484. 'TF2_RegeneratePlayer',
  485. 'TF2_AddCondition',
  486. 'TF2_RemoveCondition',
  487. 'TF2_SetPlayerPowerPlay',
  488. 'TF2_DisguisePlayer',
  489. 'TF2_RemovePlayerDisguise',
  490. 'TF2_StunPlayer',
  491. 'TF2_MakeBleed',
  492. 'TF2_GetClass',
  493. 'TF2_CalcIsAttackCritical',
  494. 'TF2_OnIsHolidayActive',
  495. 'TF2_IsHolidayActive',
  496. 'TF2_IsPlayerInDuel',
  497. 'TF2_RemoveWearable',
  498. 'TF2_OnConditionAdded',
  499. 'TF2_OnConditionRemoved',
  500. 'TF2_OnWaitingForPlayersStart',
  501. 'TF2_OnWaitingForPlayersEnd',
  502. 'TF2_OnPlayerTeleport',
  503. 'SQL_Connect',
  504. 'SQL_DefConnect',
  505. 'SQL_ConnectCustom',
  506. 'SQLite_UseDatabase',
  507. 'SQL_CheckConfig',
  508. 'SQL_GetDriver',
  509. 'SQL_ReadDriver',
  510. 'SQL_GetDriverIdent',
  511. 'SQL_GetDriverProduct',
  512. 'SQL_SetCharset',
  513. 'SQL_GetAffectedRows',
  514. 'SQL_GetInsertId',
  515. 'SQL_GetError',
  516. 'SQL_EscapeString',
  517. 'SQL_QuoteString',
  518. 'SQL_FastQuery',
  519. 'SQL_Query',
  520. 'SQL_PrepareQuery',
  521. 'SQL_FetchMoreResults',
  522. 'SQL_HasResultSet',
  523. 'SQL_GetRowCount',
  524. 'SQL_GetFieldCount',
  525. 'SQL_FieldNumToName',
  526. 'SQL_FieldNameToNum',
  527. 'SQL_FetchRow',
  528. 'SQL_MoreRows',
  529. 'SQL_Rewind',
  530. 'SQL_FetchString',
  531. 'SQL_FetchFloat',
  532. 'SQL_FetchInt',
  533. 'SQL_IsFieldNull',
  534. 'SQL_FetchSize',
  535. 'SQL_BindParamInt',
  536. 'SQL_BindParamFloat',
  537. 'SQL_BindParamString',
  538. 'SQL_Execute',
  539. 'SQL_LockDatabase',
  540. 'SQL_UnlockDatabase',
  541. 'SQLTCallback',
  542. 'SQL_IsSameConnection',
  543. 'SQL_TConnect',
  544. 'SQL_TQuery',
  545. 'SQL_CreateTransaction',
  546. 'SQL_AddQuery',
  547. 'SQLTxnSuccess',
  548. 'SQLTxnFailure',
  549. 'SQL_ExecuteTransaction',
  550. 'CloseHandle',
  551. 'CloneHandle',
  552. 'MenuHandler',
  553. 'CreateMenu',
  554. 'DisplayMenu',
  555. 'DisplayMenuAtItem',
  556. 'AddMenuItem',
  557. 'InsertMenuItem',
  558. 'RemoveMenuItem',
  559. 'RemoveAllMenuItems',
  560. 'GetMenuItem',
  561. 'GetMenuSelectionPosition',
  562. 'GetMenuItemCount',
  563. 'SetMenuPagination',
  564. 'GetMenuPagination',
  565. 'GetMenuStyle',
  566. 'SetMenuTitle',
  567. 'GetMenuTitle',
  568. 'CreatePanelFromMenu',
  569. 'GetMenuExitButton',
  570. 'SetMenuExitButton',
  571. 'GetMenuExitBackButton',
  572. 'SetMenuExitBackButton',
  573. 'SetMenuNoVoteButton',
  574. 'CancelMenu',
  575. 'GetMenuOptionFlags',
  576. 'SetMenuOptionFlags',
  577. 'IsVoteInProgress',
  578. 'CancelVote',
  579. 'VoteMenu',
  580. 'VoteMenuToAll',
  581. 'VoteHandler',
  582. 'SetVoteResultCallback',
  583. 'CheckVoteDelay',
  584. 'IsClientInVotePool',
  585. 'RedrawClientVoteMenu',
  586. 'GetMenuStyleHandle',
  587. 'CreatePanel',
  588. 'CreateMenuEx',
  589. 'GetClientMenu',
  590. 'CancelClientMenu',
  591. 'GetMaxPageItems',
  592. 'GetPanelStyle',
  593. 'SetPanelTitle',
  594. 'DrawPanelItem',
  595. 'DrawPanelText',
  596. 'CanPanelDrawFlags',
  597. 'SetPanelKeys',
  598. 'SendPanelToClient',
  599. 'GetPanelTextRemaining',
  600. 'GetPanelCurrentKey',
  601. 'SetPanelCurrentKey',
  602. 'RedrawMenuItem',
  603. 'InternalShowMenu',
  604. 'GetMenuVoteInfo',
  605. 'IsNewVoteAllowed',
  606. 'PrefetchSound',
  607. 'EmitAmbientSound',
  608. 'FadeClientVolume',
  609. 'StopSound',
  610. 'EmitSound',
  611. 'EmitSentence',
  612. 'GetDistGainFromSoundLevel',
  613. 'AmbientSHook',
  614. 'NormalSHook',
  615. 'AddAmbientSoundHook',
  616. 'AddNormalSoundHook',
  617. 'RemoveAmbientSoundHook',
  618. 'RemoveNormalSoundHook',
  619. 'EmitSoundToClient',
  620. 'EmitSoundToAll',
  621. 'ATTN_TO_SNDLEVEL',
  622. 'GetGameSoundParams',
  623. 'EmitGameSound',
  624. 'EmitAmbientGameSound',
  625. 'EmitGameSoundToClient',
  626. 'EmitGameSoundToAll',
  627. 'PrecacheScriptSound',
  628. 'strlen',
  629. 'StrContains',
  630. 'strcmp',
  631. 'strncmp',
  632. 'StrEqual',
  633. 'strcopy',
  634. 'Format',
  635. 'FormatEx',
  636. 'VFormat',
  637. 'StringToInt',
  638. 'StringToIntEx',
  639. 'IntToString',
  640. 'StringToFloat',
  641. 'StringToFloatEx',
  642. 'FloatToString',
  643. 'BreakString',
  644. 'TrimString',
  645. 'SplitString',
  646. 'ReplaceString',
  647. 'ReplaceStringEx',
  648. 'GetCharBytes',
  649. 'IsCharAlpha',
  650. 'IsCharNumeric',
  651. 'IsCharSpace',
  652. 'IsCharMB',
  653. 'IsCharUpper',
  654. 'IsCharLower',
  655. 'StripQuotes',
  656. 'CharToUpper',
  657. 'CharToLower',
  658. 'FindCharInString',
  659. 'StrCat',
  660. 'ExplodeString',
  661. 'ImplodeStrings',
  662. 'GetVectorLength',
  663. 'GetVectorDistance',
  664. 'GetVectorDotProduct',
  665. 'GetVectorCrossProduct',
  666. 'NormalizeVector',
  667. 'GetAngleVectors',
  668. 'GetVectorAngles',
  669. 'GetVectorVectors',
  670. 'AddVectors',
  671. 'SubtractVectors',
  672. 'ScaleVector',
  673. 'NegateVector',
  674. 'MakeVectorFromPoints',
  675. 'BaseComm_IsClientGagged',
  676. 'BaseComm_IsClientMuted',
  677. 'BaseComm_SetClientGag',
  678. 'BaseComm_SetClientMute',
  679. 'FormatUserLogText',
  680. 'FindPluginByFile',
  681. 'FindTarget',
  682. 'AcceptEntityInput',
  683. 'SetVariantBool',
  684. 'SetVariantString',
  685. 'SetVariantInt',
  686. 'SetVariantFloat',
  687. 'SetVariantVector3D',
  688. 'SetVariantPosVector3D',
  689. 'SetVariantColor',
  690. 'SetVariantEntity',
  691. 'GameRules_GetProp',
  692. 'GameRules_SetProp',
  693. 'GameRules_GetPropFloat',
  694. 'GameRules_SetPropFloat',
  695. 'GameRules_GetPropEnt',
  696. 'GameRules_SetPropEnt',
  697. 'GameRules_GetPropVector',
  698. 'GameRules_SetPropVector',
  699. 'GameRules_GetPropString',
  700. 'GameRules_SetPropString',
  701. 'GameRules_GetRoundState',
  702. 'OnClientConnect',
  703. 'OnClientConnected',
  704. 'OnClientPutInServer',
  705. 'OnClientDisconnect',
  706. 'OnClientDisconnect_Post',
  707. 'OnClientCommand',
  708. 'OnClientSettingsChanged',
  709. 'OnClientAuthorized',
  710. 'OnClientPreAdminCheck',
  711. 'OnClientPostAdminFilter',
  712. 'OnClientPostAdminCheck',
  713. 'GetMaxClients',
  714. 'GetMaxHumanPlayers',
  715. 'GetClientCount',
  716. 'GetClientName',
  717. 'GetClientIP',
  718. 'GetClientAuthString',
  719. 'GetClientAuthId',
  720. 'GetSteamAccountID',
  721. 'GetClientUserId',
  722. 'IsClientConnected',
  723. 'IsClientInGame',
  724. 'IsClientInKickQueue',
  725. 'IsClientAuthorized',
  726. 'IsFakeClient',
  727. 'IsClientSourceTV',
  728. 'IsClientReplay',
  729. 'IsClientObserver',
  730. 'IsPlayerAlive',
  731. 'GetClientInfo',
  732. 'GetClientTeam',
  733. 'SetUserAdmin',
  734. 'GetUserAdmin',
  735. 'AddUserFlags',
  736. 'RemoveUserFlags',
  737. 'SetUserFlagBits',
  738. 'GetUserFlagBits',
  739. 'CanUserTarget',
  740. 'RunAdminCacheChecks',
  741. 'NotifyPostAdminCheck',
  742. 'CreateFakeClient',
  743. 'SetFakeClientConVar',
  744. 'GetClientHealth',
  745. 'GetClientModel',
  746. 'GetClientWeapon',
  747. 'GetClientMaxs',
  748. 'GetClientMins',
  749. 'GetClientAbsAngles',
  750. 'GetClientAbsOrigin',
  751. 'GetClientArmor',
  752. 'GetClientDeaths',
  753. 'GetClientFrags',
  754. 'GetClientDataRate',
  755. 'IsClientTimingOut',
  756. 'GetClientTime',
  757. 'GetClientLatency',
  758. 'GetClientAvgLatency',
  759. 'GetClientAvgLoss',
  760. 'GetClientAvgChoke',
  761. 'GetClientAvgData',
  762. 'GetClientAvgPackets',
  763. 'GetClientOfUserId',
  764. 'KickClient',
  765. 'KickClientEx',
  766. 'ChangeClientTeam',
  767. 'GetClientSerial',
  768. 'GetClientFromSerial',
  769. 'FindStringTable',
  770. 'GetNumStringTables',
  771. 'GetStringTableNumStrings',
  772. 'GetStringTableMaxStrings',
  773. 'GetStringTableName',
  774. 'FindStringIndex',
  775. 'ReadStringTable',
  776. 'GetStringTableDataLength',
  777. 'GetStringTableData',
  778. 'SetStringTableData',
  779. 'AddToStringTable',
  780. 'LockStringTables',
  781. 'AddFileToDownloadsTable',
  782. 'GetEntityFlags',
  783. 'SetEntityFlags',
  784. 'GetEntityMoveType',
  785. 'SetEntityMoveType',
  786. 'GetEntityRenderMode',
  787. 'SetEntityRenderMode',
  788. 'GetEntityRenderFx',
  789. 'SetEntityRenderFx',
  790. 'SetEntityRenderColor',
  791. 'GetEntityGravity',
  792. 'SetEntityGravity',
  793. 'SetEntityHealth',
  794. 'GetClientButtons',
  795. 'EntityOutput',
  796. 'HookEntityOutput',
  797. 'UnhookEntityOutput',
  798. 'HookSingleEntityOutput',
  799. 'UnhookSingleEntityOutput',
  800. 'SMC_CreateParser',
  801. 'SMC_ParseFile',
  802. 'SMC_GetErrorString',
  803. 'SMC_ParseStart',
  804. 'SMC_SetParseStart',
  805. 'SMC_ParseEnd',
  806. 'SMC_SetParseEnd',
  807. 'SMC_NewSection',
  808. 'SMC_KeyValue',
  809. 'SMC_EndSection',
  810. 'SMC_SetReaders',
  811. 'SMC_RawLine',
  812. 'SMC_SetRawLine',
  813. 'BfWriteBool',
  814. 'BfWriteByte',
  815. 'BfWriteChar',
  816. 'BfWriteShort',
  817. 'BfWriteWord',
  818. 'BfWriteNum',
  819. 'BfWriteFloat',
  820. 'BfWriteString',
  821. 'BfWriteEntity',
  822. 'BfWriteAngle',
  823. 'BfWriteCoord',
  824. 'BfWriteVecCoord',
  825. 'BfWriteVecNormal',
  826. 'BfWriteAngles',
  827. 'BfReadBool',
  828. 'BfReadByte',
  829. 'BfReadChar',
  830. 'BfReadShort',
  831. 'BfReadWord',
  832. 'BfReadNum',
  833. 'BfReadFloat',
  834. 'BfReadString',
  835. 'BfReadEntity',
  836. 'BfReadAngle',
  837. 'BfReadCoord',
  838. 'BfReadVecCoord',
  839. 'BfReadVecNormal',
  840. 'BfReadAngles',
  841. 'BfGetNumBytesLeft',
  842. 'CreateProfiler',
  843. 'StartProfiling',
  844. 'StopProfiling',
  845. 'GetProfilerTime',
  846. 'OnPluginStart',
  847. 'AskPluginLoad2',
  848. 'OnPluginEnd',
  849. 'OnPluginPauseChange',
  850. 'OnGameFrame',
  851. 'OnMapStart',
  852. 'OnMapEnd',
  853. 'OnConfigsExecuted',
  854. 'OnAutoConfigsBuffered',
  855. 'OnAllPluginsLoaded',
  856. 'GetMyHandle',
  857. 'GetPluginIterator',
  858. 'MorePlugins',
  859. 'ReadPlugin',
  860. 'GetPluginStatus',
  861. 'GetPluginFilename',
  862. 'IsPluginDebugging',
  863. 'GetPluginInfo',
  864. 'FindPluginByNumber',
  865. 'SetFailState',
  866. 'ThrowError',
  867. 'GetTime',
  868. 'FormatTime',
  869. 'LoadGameConfigFile',
  870. 'GameConfGetOffset',
  871. 'GameConfGetKeyValue',
  872. 'GameConfGetAddress',
  873. 'GetSysTickCount',
  874. 'AutoExecConfig',
  875. 'RegPluginLibrary',
  876. 'LibraryExists',
  877. 'GetExtensionFileStatus',
  878. 'OnLibraryAdded',
  879. 'OnLibraryRemoved',
  880. 'ReadMapList',
  881. 'SetMapListCompatBind',
  882. 'OnClientFloodCheck',
  883. 'OnClientFloodResult',
  884. 'CanTestFeatures',
  885. 'GetFeatureStatus',
  886. 'RequireFeature',
  887. 'LoadFromAddress',
  888. 'StoreToAddress',
  889. 'CreateStack',
  890. 'PushStackCell',
  891. 'PushStackString',
  892. 'PushStackArray',
  893. 'PopStackCell',
  894. 'PopStackString',
  895. 'PopStackArray',
  896. 'IsStackEmpty',
  897. 'PopStack',
  898. 'OnPlayerRunCmd',
  899. 'BuildPath',
  900. 'OpenDirectory',
  901. 'ReadDirEntry',
  902. 'OpenFile',
  903. 'DeleteFile',
  904. 'ReadFileLine',
  905. 'ReadFile',
  906. 'ReadFileString',
  907. 'WriteFile',
  908. 'WriteFileString',
  909. 'WriteFileLine',
  910. 'ReadFileCell',
  911. 'WriteFileCell',
  912. 'IsEndOfFile',
  913. 'FileSeek',
  914. 'FilePosition',
  915. 'FileExists',
  916. 'RenameFile',
  917. 'DirExists',
  918. 'FileSize',
  919. 'FlushFile',
  920. 'RemoveDir',
  921. 'CreateDirectory',
  922. 'GetFileTime',
  923. 'LogToOpenFile',
  924. 'LogToOpenFileEx',
  925. 'PbReadInt',
  926. 'PbReadFloat',
  927. 'PbReadBool',
  928. 'PbReadString',
  929. 'PbReadColor',
  930. 'PbReadAngle',
  931. 'PbReadVector',
  932. 'PbReadVector2D',
  933. 'PbGetRepeatedFieldCount',
  934. 'PbSetInt',
  935. 'PbSetFloat',
  936. 'PbSetBool',
  937. 'PbSetString',
  938. 'PbSetColor',
  939. 'PbSetAngle',
  940. 'PbSetVector',
  941. 'PbSetVector2D',
  942. 'PbAddInt',
  943. 'PbAddFloat',
  944. 'PbAddBool',
  945. 'PbAddString',
  946. 'PbAddColor',
  947. 'PbAddAngle',
  948. 'PbAddVector',
  949. 'PbAddVector2D',
  950. 'PbRemoveRepeatedFieldValue',
  951. 'PbReadMessage',
  952. 'PbReadRepeatedMessage',
  953. 'PbAddMessage',
  954. 'SetNextMap',
  955. 'GetNextMap',
  956. 'ForceChangeLevel',
  957. 'GetMapHistorySize',
  958. 'GetMapHistory',
  959. 'GeoipCode2',
  960. 'GeoipCode3',
  961. 'GeoipCountry',
  962. 'MarkNativeAsOptional',
  963. 'RegClientCookie',
  964. 'FindClientCookie',
  965. 'SetClientCookie',
  966. 'GetClientCookie',
  967. 'SetAuthIdCookie',
  968. 'AreClientCookiesCached',
  969. 'OnClientCookiesCached',
  970. 'CookieMenuHandler',
  971. 'SetCookiePrefabMenu',
  972. 'SetCookieMenuItem',
  973. 'ShowCookieMenu',
  974. 'GetCookieIterator',
  975. 'ReadCookieIterator',
  976. 'GetCookieAccess',
  977. 'GetClientCookieTime',
  978. 'LoadTranslations',
  979. 'SetGlobalTransTarget',
  980. 'GetClientLanguage',
  981. 'GetServerLanguage',
  982. 'GetLanguageCount',
  983. 'GetLanguageInfo',
  984. 'SetClientLanguage',
  985. 'GetLanguageByCode',
  986. 'GetLanguageByName',
  987. 'CS_OnBuyCommand',
  988. 'CS_OnCSWeaponDrop',
  989. 'CS_OnGetWeaponPrice',
  990. 'CS_OnTerminateRound',
  991. 'CS_RespawnPlayer',
  992. 'CS_SwitchTeam',
  993. 'CS_DropWeapon',
  994. 'CS_TerminateRound',
  995. 'CS_GetTranslatedWeaponAlias',
  996. 'CS_GetWeaponPrice',
  997. 'CS_GetClientClanTag',
  998. 'CS_SetClientClanTag',
  999. 'CS_GetTeamScore',
  1000. 'CS_SetTeamScore',
  1001. 'CS_GetMVPCount',
  1002. 'CS_SetMVPCount',
  1003. 'CS_GetClientContributionScore',
  1004. 'CS_SetClientContributionScore',
  1005. 'CS_GetClientAssists',
  1006. 'CS_SetClientAssists',
  1007. 'CS_AliasToWeaponID',
  1008. 'CS_WeaponIDToAlias',
  1009. 'CS_IsValidWeaponID',
  1010. 'CS_UpdateClientModel',
  1011. 'LogToGame',
  1012. 'SetRandomSeed',
  1013. 'GetRandomFloat',
  1014. 'GetRandomInt',
  1015. 'IsMapValid',
  1016. 'IsDedicatedServer',
  1017. 'GetEngineTime',
  1018. 'GetGameTime',
  1019. 'GetGameTickCount',
  1020. 'GetGameDescription',
  1021. 'GetGameFolderName',
  1022. 'GetCurrentMap',
  1023. 'PrecacheModel',
  1024. 'PrecacheSentenceFile',
  1025. 'PrecacheDecal',
  1026. 'PrecacheGeneric',
  1027. 'IsModelPrecached',
  1028. 'IsDecalPrecached',
  1029. 'IsGenericPrecached',
  1030. 'PrecacheSound',
  1031. 'IsSoundPrecached',
  1032. 'CreateDialog',
  1033. 'GetEngineVersion',
  1034. 'PrintToChat',
  1035. 'PrintToChatAll',
  1036. 'PrintCenterText',
  1037. 'PrintCenterTextAll',
  1038. 'PrintHintText',
  1039. 'PrintHintTextToAll',
  1040. 'ShowVGUIPanel',
  1041. 'CreateHudSynchronizer',
  1042. 'SetHudTextParams',
  1043. 'SetHudTextParamsEx',
  1044. 'ShowSyncHudText',
  1045. 'ClearSyncHud',
  1046. 'ShowHudText',
  1047. 'ShowMOTDPanel',
  1048. 'DisplayAskConnectBox',
  1049. 'EntIndexToEntRef',
  1050. 'EntRefToEntIndex',
  1051. 'MakeCompatEntRef',
  1052. 'SetClientViewEntity',
  1053. 'SetLightStyle',
  1054. 'GetClientEyePosition',
  1055. 'CreateDataPack',
  1056. 'WritePackCell',
  1057. 'WritePackFloat',
  1058. 'WritePackString',
  1059. 'ReadPackCell',
  1060. 'ReadPackFloat',
  1061. 'ReadPackString',
  1062. 'ResetPack',
  1063. 'GetPackPosition',
  1064. 'SetPackPosition',
  1065. 'IsPackReadable',
  1066. 'LogMessage',
  1067. 'LogToFile',
  1068. 'LogToFileEx',
  1069. 'LogAction',
  1070. 'LogError',
  1071. 'OnLogAction',
  1072. 'GameLogHook',
  1073. 'AddGameLogHook',
  1074. 'RemoveGameLogHook',
  1075. 'FindTeamByName',
  1076. 'StartPrepSDKCall',
  1077. 'PrepSDKCall_SetVirtual',
  1078. 'PrepSDKCall_SetSignature',
  1079. 'PrepSDKCall_SetAddress',
  1080. 'PrepSDKCall_SetFromConf',
  1081. 'PrepSDKCall_SetReturnInfo',
  1082. 'PrepSDKCall_AddParameter',
  1083. 'EndPrepSDKCall',
  1084. 'SDKCall',
  1085. 'GetPlayerResourceEntity',
  1086. )
  1087. if __name__ == '__main__': # pragma: no cover
  1088. import re
  1089. from urllib.request import FancyURLopener
  1090. from pygments.util import format_lines
  1091. class Opener(FancyURLopener):
  1092. version = 'Mozilla/5.0 (Pygments Sourcemod Builtins Update)'
  1093. opener = Opener()
  1094. def get_version():
  1095. f = opener.open('http://docs.sourcemod.net/api/index.php')
  1096. r = re.compile(r'SourceMod v\.<b>([\d\.]+(?:-\w+)?)</td>')
  1097. for line in f:
  1098. m = r.search(line.decode())
  1099. if m is not None:
  1100. return m.groups()[0]
  1101. raise ValueError('No version in api docs')
  1102. def get_sm_functions():
  1103. f = opener.open('http://docs.sourcemod.net/api/SMfuncs.js')
  1104. r = re.compile(r'SMfunctions\[\d+\] = Array \("(?:public )?([^,]+)",".+"\);')
  1105. functions = []
  1106. for line in f:
  1107. m = r.match(line.decode())
  1108. if m is not None:
  1109. functions.append(m.groups()[0])
  1110. return functions
  1111. def regenerate(filename, natives):
  1112. with open(filename, encoding='utf-8') as fp:
  1113. content = fp.read()
  1114. header = content[:content.find('FUNCTIONS = (')]
  1115. footer = content[content.find("if __name__ == '__main__':")-1:]
  1116. with open(filename, 'w', encoding='utf-8') as fp:
  1117. fp.write(header)
  1118. fp.write(format_lines('FUNCTIONS', natives))
  1119. fp.write('\n\n' + footer)
  1120. def run():
  1121. version = get_version()
  1122. print('> Downloading function index for SourceMod %s' % version)
  1123. functions = get_sm_functions()
  1124. print('> %d functions found:' % len(functions))
  1125. functionlist = []
  1126. for full_function_name in functions:
  1127. print('>> %s' % full_function_name)
  1128. functionlist.append(full_function_name)
  1129. regenerate(__file__, functionlist)
  1130. run()