Commit Graph
1117 Commits
Author SHA1 Message Date
Corey D 9321229321 Add GetClientOriginalLanguage (#1810)
Creates a native which will return the language the client connected with.
2022-07-28 18:10:51 -07:00
Accelerator e5ebd65176 Exposed SDKCall_Engine call type to use CVEngineServer methods (#1648)
* Update vdecoder.h

* Update vcaller.cpp

* Update sdktools.inc
2022-07-26 22:14:49 +02:00
Dysphie 5f7b22d2a4 Allow using sm_nominate without args from console (#1803) 2022-07-26 22:09:48 +02:00
Mikusch 278998f7d0 SDKTools: Add explode parameter to ForcePlayerSuicide native (#1782)
* Expose CommitSuicide params

* A single space

* Validate param count

* Set force param to true by default
2022-07-07 14:14:50 +02:00
peace-maker c29e185d2a Bump version to 1.12 for manual builds (#1795) 2022-07-05 15:13:52 +02:00
Deathreus 37c2a83523 Add a PluginIterator methodmap (#1779)
* Add a PluginIterator methodmap

* Follow convention

* Update sourcemod.inc

* Turn method ReadPlugin into property Plugin

* Requested change

* Update sourcemod.inc

* Curse you VSC

* Follow behavior of other iterators instead of the natives

* Fix a stray space

* Implement a hacked CPluginIterator

* Oops

Copy paste go brr

* Revert a change made before the custom impl
2022-06-24 11:46:03 +02:00
Psykotikism 7a3d4e70bf Add "DispatchKeyValueInt" stock (#1764) 2022-05-06 14:53:57 +01:00
Arron Vinyard 6e73aba250 Remove unnecessary timer typeset entry (#1735) 2022-05-03 19:34:20 -07:00
Arron Vinyard 5797411b2b NPOTB: Use camel casing for variables in adminhelp.sp (#1750)
This is a stylistic change to ensure more adhered-to consistency throughout base plugins
2022-05-03 18:45:45 -07:00
Sikari d2c4257c36 Prevent workshop prefix from showing in nominations results menu (#1737)
Prevents workshop prefixes from being shown instead of the display names in results menus when items are disabled
2022-05-03 02:10:10 -07:00
domino_ b057580a62 Add a OnPlayerRunCmdPre forward (#1760)
Adds an OnPlayerRunCmdPre forward in order for plugins to be able to hook OnPlayerRunCmd with the guarantee that none of the parameters have been modified by other plugins. As such, OnPlayerRunCmdPre's parameters cannot be modified and are read-only. 

Plugins that wish to use OnPlayerRunCmdPre can maintain backwards compatibility with SourceMod 1.10 by falling back to OnPlayerRunCmd if the Pre variant was never fired.
2022-04-25 14:00:53 -07:00
Kyle ab8bbbd118 Honor AUTOLOAD_EXTENSIONS in clientprefs include (#1718)
* Optional autoload extensions

* revert autoload for cstrike/tf2
2022-04-21 13:44:24 +02:00
peace-maker 39d604ae6c DHooks: Allow setting CBaseEntity* param to NULL #1751 (#1754)
* DHooks: Allow setting CBaseEntity* param to NULL #1751

The param had to be a valid entity and wasn't allowed to be set to NULL. Behave similar to SetReturn which maps INVALID_ENT_REFERENCE (or -1) to NULL.

* Update include documentation
2022-04-20 15:32:37 +02:00
Gaben 6e1f095186 Allow h-flag admins to bypass vote delay (#1733) 2022-04-12 11:19:54 +01:00
Arron Vinyard 852703ccca Add GetCmdArgFloat(Ex) stocks (#1742) 2022-04-12 11:17:05 +01:00
Mikusch 96ae65a96c Remove misleading note on DynamicHook.RemoveHook docs (#1725) 2022-03-07 12:34:25 -05:00
rtldg f307e44b79 Correct some function docs that return char count (#1721) 2022-02-25 15:20:12 -08:00
V dc8a22a76a Inline one-expression single-use functions (#1700) 2022-02-25 10:39:45 +01:00
Corey D addfb3c8a1 Add MAX_AUTHID_LENGTH (#1696) 2022-02-15 10:21:35 +00:00
Erik Minekus 358bcca3a2 Database.Format destination buffer should not be marked const (#1714) 2022-02-14 07:39:03 -05:00
Corey D b209279589 Add bitwise SetBitFlags for AdminId and GroupId (#1677)
* Add bitwise SetFlags for AdminId

* Inline SetFlags natives
2022-02-12 13:14:57 +01:00
Alienmario dc9c52bfd6 Enable nextmap for Black Mesa (#1695) 2022-02-04 13:50:26 +00:00
Ҝℴţأķ f5461df28c Remove hardcoded question mark from sm_vote (#1699) 2022-02-03 10:56:25 +00:00
e5afdb4181 adminhelp.sp -> Switch to the new CommandIterator() (#1388)
* Switch to the new CommandIterator() methodmap

`ReadCommandIterator` 
->
```
CmdIter.GetName(Name, sizeof(Name));
Flags = CmdIter.Flags;
CmdIter.GetDescription(Desc, sizeof(Desc));
```

* PeaceMaker fixes

* Don't fetch unused properties

Co-authored-by: Michael Flaherty <[email protected]>
Co-authored-by: Peace-Maker <[email protected]>
2022-02-01 19:13:06 +01:00
Arron Vinyard 250dc1b206 Update dhooks.inc documentation for consistency (#1658)
* Update dhooks.inc documentation for consistency

- Modifies whitespace (change tabs to spaces for non initial indents, fix alignments, create consistency with rest of SM docs)
- Change `/*` to `/**` for consistency and to indicate comment doc
- Removes incorrect `@noreturn` doc

* Split long comments across multiple lines

* Remove `@noreturn` in IGameConfigs.h

* Remove `@noreturn` from IGameHelpers.h

* Remove `@noreturn` from asm.c

* Add `@noreturn` to ThrowError

* Add `@noreturn` and `@error` to ThrowNativeError
2022-02-01 18:46:59 +01:00
Corey D c471e41dc7 Add ArrayStack.Clear native (#1676) 2022-01-22 03:26:21 -08:00
Mikusch afc9310704 Add LookupEntityAttachment & GetEntityAttachment natives (#1653)
Using the virtual `CBaseAnimating::GetAttachment(int, matrix3x4_t &)` was a deliberate choice because virtual offsets are generally easier to maintain than signatures. The `matrix3x4_t` is converted to world position and world angles internally.
Some of the other overloads are also inlined on a few games, making this the best choice.

Since this call can only be used on classes inheriting `CBaseAnimating`, we check if the `DT_BaseAnimating` SendTable exists on the entity, throwing a native error if it doesn't.
This safeguard could be greatly improved with a call to `CBaseEntity::GetBaseAnimating`, but would require more gamedata (maybe something to consider for the future?)
2022-01-03 13:13:54 +00:00
Corey D bf898dd45f Fix ArrayList return types (#1679)
ArrayList.SetString and ArrayList.SetArray both have int return types but their methodmap natives use void.
2021-12-27 12:17:04 +01:00
Headline e786ff54f7 Prevent enum shadowing & pin sourcemod for build fixes (#1661) 2021-12-10 14:22:04 -08:00
b38c9824fe sdktools: Add EntityCollisionRulesChanged & SetEntityOwner natives (#1620)
* Add EntityCollisionRulesChanged & SetEntityOwner natives

* fix win build, and unpushed changes

* Fixed bad world loop

* Requested changes + csgo offsets

* small copy paste mistake

* Strip the debug log lines

* Tiny clean up in comments

* line

* <dvander> try again

* sdktools: add default Param for owner.

Co-authored-by: Kenzzer <[email protected]>
Co-authored-by: Kyle Sanderson <[email protected]>
2021-11-21 23:03:35 -08:00
Peace-Maker 0f5f1a814e Import DHooks + Dynamic Detouring
This is the latest DHooks version from https://github.com/peace-maker/DHooks2/tree/1314f2d1b4d870677a1b9f628c770f2799878f9b
2021-11-17 13:17:39 +01:00
Nick Hastings 5787fca029 Disable Reserved Slots plugin on Contagion.
(It doesn't have sv_visiblemaxplayers).
2021-11-15 20:53:09 -05:00
FortyTwoFortyTwo 9d7e720f33 Fix compiling with tf2_stocks 2021-10-27 07:51:33 -04:00
David Anderson 2a06680252 Update to the new SourcePawn compiler.
This imports the brand new SourcePawn compiler. The new compiler is much
faster to compile and generates significantly improved code around
array generation and array access.

There are a number of compatibility changes in the new compiler. Most of
these are due to improved type checking and error detection. The full
list of notes can be found here:

https://github.com/alliedmodders/sourcepawn/blob/master/docs/upgrading-1.11.md

Additionally, .smx files generated by the new compiler will NOT load on
earlier versions of SourceMod, including earlier versions of 1.11. Old
plugins will continue to load as normal.
2021-10-26 17:45:48 -10:00
Nick Hastings 4b58b9f673 Reorder SDKCallType enum for better compatibility with existing plugins. 2021-10-26 17:32:02 -04:00
dragokas ffc23a1a1e Exposed SDKCall_Server call type to use CBaseServer methods 2021-10-26 17:18:16 -04:00
Vladimir 79d594aca3 Add OnClientLanguageChanged() forward (#1597) 2021-10-25 19:45:24 +01:00
Nick Hastings 1a65b308d1 Add support for other Steam ID formats to admin-sql-threaded (#1520). 2021-10-24 09:57:03 -04:00
Charles 897878f8ae Removed incorrect parameter RemoveChangeHook desc 2021-10-23 11:28:23 -05:00
Charles 7650cee459 Removed incorrect parameter in description 2021-10-23 11:28:23 -05:00
Corey D 30c764e4b3 Use words instead of quotes for better clarity
As suggested by sneak-it
2021-10-23 11:25:10 -05:00
Corey D dc92335fbe Missed Database.Escape 2021-10-23 11:25:10 -05:00
Corey D 8c625ca87d Clarify SQL_EscapeString usage
It's hard to see the difference between 2 single-quotes and 1 double-quote unless you highlight it.
2021-10-23 11:25:10 -05:00
GAMMACASE 11e7bb10f1 Fix CS_OnCSWeaponDrop after latest CSGO update (21/10/21) (#1602) 2021-10-22 16:20:54 +01:00
Nick Hastings 97383028e5 Add option to not bypass hooks with TakeDamage and DropWeapon natives. 2021-10-13 12:56:26 -04:00
naydef 34c5eed867 Update float.inc (#1591) 2021-10-02 20:23:43 +00:00
Asher Baker 78cb89938d Remove OnEntitySpawned forward (#1571)
`OnEntitySpawned` is 1.11 only, so this is fine given our API stability guarantees.

Unfortunately the forward name clashes with quite a few plugins using the same name for their SDKHook callback. Normally we'd just put up with this but there are difficult to solve binary compatibility issues where those plugins will get the callback double-called, and there is a separate issue where the forward isn't called for all entity spawns (unlike the SDKHook), so most plugins can't switch to the forward anyway.

Resolves #1558.

This reverts commit 7bab9cc344.
2021-08-23 21:36:20 +01:00
Asher Baker 5ea096e61e Support reading legacy sendprop arrays (#1550)
This rounds out the work started in #1548 to complete support for
reading the older SendPropArray type array netprops, along with bringing
SDKTools' GameRule netprop code in sync with core to add string array
support.

There aren't many SendPropArray type props around but this opens up a
few interesting opportunities for plugin developers, particularly in
L4D2 with manipulation of the EMS HUD.

Tested reading the `m_vCPPositions` array in TF2, and reading/writing
the `m_szScriptedHUDStringSet` EMS HUD netprop in L4D2. Closes #1386.
2021-08-23 21:21:11 +01:00
Vladimir f4ff2ad45a Add missing return values in plugins 2021-08-21 14:11:20 -07:00
Asher Baker 296deb95e6 Return array type info with FindSendPropInfo (#1548) 2021-08-01 19:44:18 +01:00