_sourcemod_builtins.py 26 KB

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