Commit Graph

1146 Commits

Author SHA1 Message Date
Michael
a28c3cac9b
cstrike.csgo: Add native to retrieve loadout slot of weapon (#1241)
* Add native to retrieve loadout slot of weapon

* Mention the native is for CS:GO only

---------

Co-authored-by: Peace-Maker <peace-maker@wcfan.de>
2023-03-29 21:27:45 -07:00
fakuivan
6670b93cc6
keyvalues: adjust KvSavePosition return value to implementation (#757)
The current ``KvSavePosition`` definition does not reflect the behaviour seen in [core/smn_keyvalues.cpp#L973-L981](404e96ad45/core/smn_keyvalues.cpp (L973-L981)). This can cause problems if some procedure on sp expects ``KvSavePosition`` to always add one node to the stack, no matter if there is no higher node.

Co-authored-by: peace-maker <peace-maker@wcfan.de>
2023-03-29 21:06:36 -07:00
Corey D
c5087d7a39
database: flip to recursive_mutex to allow nested locks (#1937)
* Fix crash from db locking

* Change db lock to use recursive_mutex
2023-03-29 20:03:03 -07:00
FlaminSarge
5ba9816377
nominations: implement map not in pool phrase (#597)
New English text is “Map ‘%s’ is not in the nominations pool.”
2023-03-29 18:39:54 -07:00
peace-maker
008fbf78a5
Cleanup the translation files (#1962)
* Remove obsolete slapslay.phrases.txt

That plugin isn't in the stock arsenal since forever.

* Remove "Dead Player Rename" phrase

Unused since #313

* Remove nominations phrases from rockthevote

Those phrases were moved to their own nominations.phrases.txt

* Remove "Next Map" phrase from nextmap.phrases.txt

It was moved to basetriggers.phrases.txt

* Remove unused phrases from common.phrases.txt

Only "Slapped Player" was moved to funvotes.phrases.txt

* Delete empty phrase files

* Fix workflow python version selection

3.10 would select Python 3.1 and fail

* Deduplicate "Please select a map" phrase

Only keep it in the plugin.basecommands.txt file and remove it from the basevotes.phrases.txt.

Both plugins using the phrase load the basecommands phrases.

* Allow manual triggering of translations action

* Actually use the nextmap phrases

They were never referenced in the plugin. The "ago" phrase doesn't work the way it is and needs more rethinking.
2023-03-30 01:13:40 +02:00
Mikusch
5539484f92
Add support for float modulo operator (#1953) 2023-03-19 16:19:42 +00:00
Alienmario
850f96b986
Allow void return type in timer callbacks (#1916) 2023-03-02 21:28:42 -08:00
Impact
1f5b735dbd
Add note about automatic unhook (#1910) 2023-01-22 10:23:40 +01:00
Rushaway
221d34f809
fix: Print full map name in Log instead of args (#1907) 2023-01-15 13:32:41 -05:00
Nicholas Hastings
8922ed0c5d
Add TE_WriteEnt and TE_ReadEnt natives to SDKTools. (#1905) 2023-01-14 14:48:05 +00:00
ambaca
8f7a1641fc
Friendly Fire support L4D(2) games. (#1530)
Support L4D(2) Friendly Fire In Basetriggers.sp #1522

- Games have cvar mp_friendlyfire min. and max. bounds set to 1
- Removing mp_friendlyfire lower bound and set to 0, cvar have no purpose on friendly fire damage.
- FF works from z_difficulty and each difficult level have FF damage ration cvars:
survivor_friendly_fire_factor_easy
survivor_friendly_fire_factor_normal
survivor_friendly_fire_factor_hard
survivor_friendly_fire_factor_expert

Update added PRINT_TO_ things from previous update.

Co-authored-by: Bacardi <>
2022-12-29 14:00:58 +00:00
nosoop
2130c60fd9
Implement raw entity handle accessors (#1830)
* Implement raw entity handle accessors

* Fix FromPseudoAddress calls on 64-bit

* fixup: Remove unnecessary ent deref

* fixup: Correct param index in thrown error
2022-12-29 03:57:47 +00:00
peace-maker
4320d7b17a
Get sdktools and sdkhooks/dhooks to load on hl2sdk-mock (#1892)
* Build SDKTools for hl2sdk-mock

* Fix loading of extensions using advanced naming scheme for hl2sdk-mock

* Fix error on missing sv_visiblemaxplayers convar

* Build SDKHooks for hl2sdk-mock

* Fix x86_64 SourcePawn VM filename

* SDKHooks: Ignore missing IEntityListeners list in hl2sdk-mock
2022-12-22 18:39:12 +01:00
Benoist
f8349e846a
Fix SetEntityHealth to support 'any' entities (#1846)
Co-authored-by: Kenzzer <kenzzer@users.noreply.github.com>
2022-12-20 22:07:57 +00:00
Nicholas Hastings
b77e8c50ac
Add support for Military Conflict: Vietnam (#1887) 2022-12-20 21:46:18 +00:00
Nicholas Hastings
c5e69900f9
Add "sm_dsay" command to basechat for sending HUD messages (#1889)
* Add "sm_dsay" command to basechat for sending HUD messages

* Add missing SetHudTextParams call
2022-12-20 00:00:43 +00:00
Nicholas Hastings
2d5bc4007f
Add clarification to documentation for hud messages and engine dialogs (#1888)
with regard to game support.
2022-12-19 23:49:48 +00:00
peace-maker
02f188899e
Add CommandIterator.ConVarFlags property (#1869)
* Add CommandIterator.ConVarFlags property

Allow to access the convar flags `FCVAR_*` value from the iterator.
The CommandIterator.Flags property should have been called `AdminFlags`,
but it's too late to change that now.

* Switch admin help menu to use CommandIterator.ConVarFlags

No need to lookup the convar again.

* Deprecate CommandIterator.Flags

Rename it to .AdminFlags now that we have two kinds of flags exposed
on the iterator.
2022-12-04 12:24:56 +01:00
Corey D
5d391fda07
Add SMCParser.ParseString (#1817) 2022-12-02 16:55:08 +01:00
vanz666
8538233985
Expose custom sdktools trace types from hl2sdk (#1822)
* Update trnatives.cpp

* Update sdktools_trace.inc

* Update trnatives.cpp
2022-12-02 14:11:05 +01:00
Corey D
3b4a343274
Add natives to get chat triggers (#1816) 2022-12-02 13:55:32 +01:00
Batfoxkid
ed662dc8cf
Block Hidden Commands from Help Command (#1831)
Allows using `FCVAR_HIDDEN` to block commands from appearing in `sm_help` and `sm_searchcmd` which helps with creating alias to commands without filling up the list with those aliases.

For example:
```sourcepawn
RegAdminCmd("sm_setmyperk", MyCommand, ADMFLAG_CHEATS);
RegAdminCmd("sm_setmyperks", MyCommand, ADMFLAG_CHEATS, _, FCVAR_HIDDEN);

RegConsoleCmd("ff2_boss", MyCommand);
RegConsoleCmd("ff2boss", MyCommand, _, FCVAR_HIDDEN);
```
2022-12-01 22:04:59 +01:00
Maxime Leroy
4989666d72
Add logging to all basevote vote results (#1794) 2022-10-30 23:26:17 +01:00
Spirrwell
e34e9b9869
Split PVKII into its own engine branch (#1847)
* Initial PVKII branch support

* Change PVKII code to 23, DOTA uses 22 in MM

* Bunch more SE_PVKII preprocessor that was missed

* Add some missing SOURCE_ENGINE_PVKII cases

* Update PVKII FireOutput signature for Linux

* Update checkout-deps with 'pvkii'

* Fix FireOutput signature for PVKII, accidentally used one from newer build

* Change PVKII code to 10, and bump others by 1

* Only check against SE_SDK2013 here, like Metamod

* More SE_PVKII preprocessor cleanup
2022-10-24 19:27:32 +00:00
Bara
4015f9c1c9
Replace old link with newer working one (#1837) 2022-09-19 22:35:49 +02:00
nosoop
21740d9a26
Add functions for working with entity lumps (#1673) 2022-09-05 15:44:58 -07:00
Impact
05aa3fd39d
Update CreateDirectory (#1813)
* Update CreateDirectory docs

Add default arguments and a note about deep paths.

* Update note

* Add note about use_valve_fs
2022-08-27 01:59:43 +02:00
eyal282
24f1c89b96
Add Clientprefs helpers for integers and strings (#1727)
* Update clientprefs.inc

* Update clientprefs.inc

* Update clientprefs.inc

* Update clientprefs.inc

* Update clientprefs.inc

* Update clientprefs.inc

* Update clientprefs.inc

* Update clientprefs.inc

* Update clientprefs.inc

* Update clientprefs.inc

* Update clientprefs.inc
2022-07-31 11:59:25 +02:00
Kevin Yonan
a761194917
Update operator% forwards to newdecls (#1763) 2022-07-28 18:12:00 -07:00
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