pymodcs 0.17.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pymod/__init__.py +740 -0
- pymod/__init__.pyi +1413 -0
- pymod/__main__.py +78 -0
- pymod/_access.py +555 -0
- pymod/_assets.py +173 -0
- pymod/_audio.py +127 -0
- pymod/_chat.py +116 -0
- pymod/_color.py +191 -0
- pymod/_config.py +309 -0
- pymod/_cs.py +445 -0
- pymod/_cs_batch.py +149 -0
- pymod/_cs_specs.py +1 -0
- pymod/_cs_types.py +235 -0
- pymod/_cvars.py +256 -0
- pymod/_database.py +132 -0
- pymod/_diagnostics.py +53 -0
- pymod/_easy.py +75 -0
- pymod/_effects.py +427 -0
- pymod/_entities.py +888 -0
- pymod/_events.py +70 -0
- pymod/_geometry.py +543 -0
- pymod/_hook_api.py +268 -0
- pymod/_hooks.py +205 -0
- pymod/_http_files.py +293 -0
- pymod/_hud.py +212 -0
- pymod/_i18n.py +164 -0
- pymod/_menus.py +128 -0
- pymod/_messages.py +220 -0
- pymod/_movement.py +396 -0
- pymod/_player.py +605 -0
- pymod/_plugin.py +735 -0
- pymod/_plugin.pyi +4540 -0
- pymod/_plugins.py +241 -0
- pymod/_position.py +66 -0
- pymod/_position.pyi +44 -0
- pymod/_resources.py +196 -0
- pymod/_runtime.py +8 -0
- pymod/_schema.py +259 -0
- pymod/_sdk_native.py +22 -0
- pymod/_services.py +820 -0
- pymod/_simple_db.py +408 -0
- pymod/_timing.py +208 -0
- pymod/_voice.py +118 -0
- pymod/_web.py +697 -0
- pymod/docs/async.md +49 -0
- pymod/docs/compatibility.md +41 -0
- pymod/docs/configuration.md +101 -0
- pymod/docs/geometry.md +62 -0
- pymod/docs/hook-add_account.md +45 -0
- pymod/docs/hook-add_multi_damage.md +48 -0
- pymod/docs/hook-add_player_item.md +44 -0
- pymod/docs/hook-add_points.md +44 -0
- pymod/docs/hook-add_points_to_team.md +44 -0
- pymod/docs/hook-apply_multi_damage.md +46 -0
- pymod/docs/hook-balance_teams.md +42 -0
- pymod/docs/hook-blind.md +46 -0
- pymod/docs/hook-bomb_defuse_end.md +45 -0
- pymod/docs/hook-bomb_defuse_start.md +44 -0
- pymod/docs/hook-bomb_explode.md +44 -0
- pymod/docs/hook-bot_event.md +47 -0
- pymod/docs/hook-buy_gun_ammo.md +45 -0
- pymod/docs/hook-buy_item.md +43 -0
- pymod/docs/hook-buy_weapon.md +43 -0
- pymod/docs/hook-can_have_player_item.md +44 -0
- pymod/docs/hook-can_hear_player.md +44 -0
- pymod/docs/hook-can_respawn.md +42 -0
- pymod/docs/hook-can_switch_team.md +43 -0
- pymod/docs/hook-can_take_damage.md +44 -0
- pymod/docs/hook-change_level.md +42 -0
- pymod/docs/hook-check_map_conditions.md +42 -0
- pymod/docs/hook-check_time_damage.md +42 -0
- pymod/docs/hook-check_win_conditions.md +42 -0
- pymod/docs/hook-choose_appearance.md +43 -0
- pymod/docs/hook-choose_team.md +43 -0
- pymod/docs/hook-classify.md +42 -0
- pymod/docs/hook-cleanup_map.md +42 -0
- pymod/docs/hook-clear_multi_damage.md +42 -0
- pymod/docs/hook-client_userinfo_changed.md +43 -0
- pymod/docs/hook-create_weaponbox.md +52 -0
- pymod/docs/hook-cs_postthink.md +42 -0
- pymod/docs/hook-cs_prethink.md +42 -0
- pymod/docs/hook-damage.md +48 -0
- pymod/docs/hook-damage_impulse.md +46 -0
- pymod/docs/hook-dead_player_weapons.md +42 -0
- pymod/docs/hook-death_notice.md +46 -0
- pymod/docs/hook-death_sound.md +42 -0
- pymod/docs/hook-disappear.md +42 -0
- pymod/docs/hook-drop_idle_player.md +43 -0
- pymod/docs/hook-drop_player_item.md +43 -0
- pymod/docs/hook-drop_shield.md +43 -0
- pymod/docs/hook-duck.md +42 -0
- pymod/docs/hook-fall_damage.md +42 -0
- pymod/docs/hook-fire_buckshots.md +51 -0
- pymod/docs/hook-fire_bullets.md +52 -0
- pymod/docs/hook-fire_bullets3.md +54 -0
- pymod/docs/hook-flash_explode.md +44 -0
- pymod/docs/hook-force_camera.md +42 -0
- pymod/docs/hook-free_game_rules.md +43 -0
- pymod/docs/hook-get_into_game.md +42 -0
- pymod/docs/hook-gib_land.md +42 -0
- pymod/docs/hook-gib_spawn.md +43 -0
- pymod/docs/hook-gib_touch.md +44 -0
- pymod/docs/hook-give_ammo.md +45 -0
- pymod/docs/hook-give_c4.md +42 -0
- pymod/docs/hook-give_default_items.md +42 -0
- pymod/docs/hook-give_named_item.md +43 -0
- pymod/docs/hook-give_shield.md +43 -0
- pymod/docs/hook-go_intermission.md +42 -0
- pymod/docs/hook-has_restrict_item.md +44 -0
- pymod/docs/hook-he_explode.md +44 -0
- pymod/docs/hook-hint_message.md +46 -0
- pymod/docs/hook-impulse_commands.md +42 -0
- pymod/docs/hook-install_game_rules.md +42 -0
- pymod/docs/hook-internal_command.md +46 -0
- pymod/docs/hook-is_penetrable.md +48 -0
- pymod/docs/hook-joining_think.md +42 -0
- pymod/docs/hook-jump.md +42 -0
- pymod/docs/hook-killed.md +46 -0
- pymod/docs/hook-make_bomber.md +42 -0
- pymod/docs/hook-make_vip.md +42 -0
- pymod/docs/hook-next_best_weapon.md +44 -0
- pymod/docs/hook-object_caps.md +42 -0
- pymod/docs/hook-observer_find_next.md +44 -0
- pymod/docs/hook-observer_set_mode.md +43 -0
- pymod/docs/hook-observer_think.md +42 -0
- pymod/docs/hook-observer_valid_target.md +44 -0
- pymod/docs/hook-on_spawn_equip.md +44 -0
- pymod/docs/hook-pain.md +44 -0
- pymod/docs/hook-plant_bomb.md +46 -0
- pymod/docs/hook-player_blind.md +50 -0
- pymod/docs/hook-player_death_think.md +42 -0
- pymod/docs/hook-player_got_weapon.md +44 -0
- pymod/docs/hook-player_precache.md +42 -0
- pymod/docs/hook-pm_air_accelerate.md +45 -0
- pymod/docs/hook-pm_air_move.md +43 -0
- pymod/docs/hook-pm_check_water_jump.md +42 -0
- pymod/docs/hook-pm_duck.md +42 -0
- pymod/docs/hook-pm_init.md +43 -0
- pymod/docs/hook-pm_jump.md +42 -0
- pymod/docs/hook-pm_ladder_move.md +43 -0
- pymod/docs/hook-pm_move.md +44 -0
- pymod/docs/hook-pm_play_step_sound.md +44 -0
- pymod/docs/hook-pm_unduck.md +42 -0
- pymod/docs/hook-pm_update_step_sound.md +42 -0
- pymod/docs/hook-pm_water_jump.md +42 -0
- pymod/docs/hook-radio.md +46 -0
- pymod/docs/hook-radius_flash_trace.md +49 -0
- pymod/docs/hook-remove_all_items.md +43 -0
- pymod/docs/hook-remove_guns.md +42 -0
- pymod/docs/hook-remove_player_item.md +44 -0
- pymod/docs/hook-remove_spawn_protection.md +42 -0
- pymod/docs/hook-reset_max_speed.md +42 -0
- pymod/docs/hook-reset_sequence_info.md +42 -0
- pymod/docs/hook-restart_round.md +42 -0
- pymod/docs/hook-round_end.md +45 -0
- pymod/docs/hook-round_freeze_end.md +42 -0
- pymod/docs/hook-round_respawn.md +42 -0
- pymod/docs/hook-rules_player_killed.md +46 -0
- pymod/docs/hook-rules_player_spawn.md +42 -0
- pymod/docs/hook-rules_server_deactivate.md +42 -0
- pymod/docs/hook-rules_spawn_spot.md +42 -0
- pymod/docs/hook-rules_think.md +42 -0
- pymod/docs/hook-select_spawn_point.md +42 -0
- pymod/docs/hook-send_death_message.md +53 -0
- pymod/docs/hook-send_say_message.md +50 -0
- pymod/docs/hook-set_animation.md +43 -0
- pymod/docs/hook-set_spawn_protection.md +43 -0
- pymod/docs/hook-set_userinfo_model.md +44 -0
- pymod/docs/hook-set_userinfo_name.md +44 -0
- pymod/docs/hook-should_switch_weapon.md +44 -0
- pymod/docs/hook-show_menu.md +46 -0
- pymod/docs/hook-show_vgui_menu.md +45 -0
- pymod/docs/hook-smoke_explode.md +42 -0
- pymod/docs/hook-spawn.md +47 -0
- pymod/docs/hook-spawn_head_gib.md +44 -0
- pymod/docs/hook-spawn_random_gibs.md +46 -0
- pymod/docs/hook-start_death_cam.md +42 -0
- pymod/docs/hook-start_observer.md +44 -0
- pymod/docs/hook-switch_team.md +42 -0
- pymod/docs/hook-take_health.md +44 -0
- pymod/docs/hook-team_full.md +43 -0
- pymod/docs/hook-team_stacked.md +44 -0
- pymod/docs/hook-throw_flashbang.md +47 -0
- pymod/docs/hook-throw_grenade.md +48 -0
- pymod/docs/hook-throw_he_grenade.md +49 -0
- pymod/docs/hook-throw_smoke_grenade.md +48 -0
- pymod/docs/hook-trace_attack.md +48 -0
- pymod/docs/hook-update_client_data.md +42 -0
- pymod/docs/hook-update_status_bar.md +42 -0
- pymod/docs/hook-use_empty.md +42 -0
- pymod/docs/hook-weapon_animation.md +44 -0
- pymod/docs/hook-weapon_can_deploy.md +42 -0
- pymod/docs/hook-weapon_deploy.md +47 -0
- pymod/docs/hook-weapon_kickback.md +49 -0
- pymod/docs/hook-weapon_post_frame.md +42 -0
- pymod/docs/hook-weapon_reload.md +45 -0
- pymod/docs/hook-weapon_shotgun_reload.md +48 -0
- pymod/docs/hook-weaponbox_set_model.md +43 -0
- pymod/docs/hooks.md +202 -0
- pymod/docs/hud.md +56 -0
- pymod/docs/index.md +45 -0
- pymod/docs/installation.md +76 -0
- pymod/docs/methods.md +1065 -0
- pymod/docs/packages.md +129 -0
- pymod/docs/permissions.md +61 -0
- pymod/docs/publishing.md +29 -0
- pymod/docs/pycharm.md +116 -0
- pymod/docs/remote.md +120 -0
- pymod/docs/resources.md +63 -0
- pymod/docs/sdk.md +81 -0
- pymod/docs/sqlite.md +86 -0
- pymod/docs/stock.md +38 -0
- pymod/docs/syntax.md +113 -0
- pymod/docs/tested.md +43 -0
- pymod/docs/web.md +82 -0
- pymod/examples/async_io.py +11 -0
- pymod/examples/custom_events.py +12 -0
- pymod/examples/damage_guard.py +11 -0
- pymod/examples/healing_cooldown.py +20 -0
- pymod/examples/hello_world.py +9 -0
- pymod/examples/panel_extension.py +8 -0
- pymod/examples/player_hud.py +11 -0
- pymod/examples/resources_demo.py +11 -0
- pymod/examples/simple_config.py +16 -0
- pymod/examples/sqlite_counter.py +13 -0
- pymod/examples/training_zone.py +16 -0
- pymod/examples/web_profile.py +18 -0
- pymod/hook_events.py +9 -0
- pymod/hook_events.pyi +3376 -0
- pymod/preferences.py +214 -0
- pymod/py.typed +0 -0
- pymod/web.css +19 -0
- pymod/web.js +64 -0
- pymod/web.py +316 -0
- pymodcs-0.17.1.dist-info/METADATA +104 -0
- pymodcs-0.17.1.dist-info/RECORD +241 -0
- pymodcs-0.17.1.dist-info/WHEEL +5 -0
- pymodcs-0.17.1.dist-info/entry_points.txt +2 -0
- pymodcs-0.17.1.dist-info/licenses/LICENSE +340 -0
- pymodcs-0.17.1.dist-info/licenses/LINKING_EXCEPTION.txt +10 -0
- pymodcs-0.17.1.dist-info/top_level.txt +1 -0
pymod/__init__.pyi
ADDED
|
@@ -0,0 +1,1413 @@
|
|
|
1
|
+
"""IDE definitions for PyMod 0.17.1. Do not deploy this SDK as the server runtime."""
|
|
2
|
+
from typing import Any, Callable, Iterator
|
|
3
|
+
from asyncio import Task
|
|
4
|
+
from ._movement import PlayerMovement as PlayerMovement
|
|
5
|
+
from ._movement import Vector as Vector
|
|
6
|
+
from ._movement import Movement as Movement
|
|
7
|
+
from ._movement import Buttons as Buttons
|
|
8
|
+
from ._movement import PlayerFlags as PlayerFlags
|
|
9
|
+
from ._movement import MoveType as MoveType
|
|
10
|
+
from ._color import Color as Color
|
|
11
|
+
from ._position import Position as Position
|
|
12
|
+
from ._player import PlayerActions as PlayerActions
|
|
13
|
+
from ._player import WeaponId as WeaponId
|
|
14
|
+
from ._player import WeaponState as WeaponState
|
|
15
|
+
from ._player import AmmoState as AmmoState
|
|
16
|
+
from ._player import Rendering as Rendering
|
|
17
|
+
from ._geometry import PlayerStateHelpers as PlayerStateHelpers
|
|
18
|
+
from ._geometry import Team as Team
|
|
19
|
+
from ._geometry import Box as Box
|
|
20
|
+
from ._geometry import Zone as Zone
|
|
21
|
+
from ._services import CommandContext as CommandContext
|
|
22
|
+
from ._services import config as config
|
|
23
|
+
from ._services import storage as storage
|
|
24
|
+
from ._services import permissions as permissions
|
|
25
|
+
from ._services import targeting as targeting
|
|
26
|
+
from ._services import server as server
|
|
27
|
+
from ._database import database as database
|
|
28
|
+
from ._menus import Menu as Menu
|
|
29
|
+
from ._menus import MenuItem as MenuItem
|
|
30
|
+
from . import web as web
|
|
31
|
+
from ._hooks import hooks as hooks
|
|
32
|
+
from ._hooks import HookResult as HookResult
|
|
33
|
+
from ._entities import Entity as Entity
|
|
34
|
+
from ._entities import EntityState as EntityState
|
|
35
|
+
from ._entities import entities as entities
|
|
36
|
+
from ._entities import trace as trace
|
|
37
|
+
from ._entities import Trace as Trace
|
|
38
|
+
from ._entities import Hull as Hull
|
|
39
|
+
from ._entities import Solid as Solid
|
|
40
|
+
from ._entities import sounds as sounds
|
|
41
|
+
from ._resources import resources as resources
|
|
42
|
+
from ._cvars import cvars as cvars
|
|
43
|
+
from ._cvars import Cvar as Cvar
|
|
44
|
+
from ._cvars import CvarFlags as CvarFlags
|
|
45
|
+
from ._cvars import CvarChange as CvarChange
|
|
46
|
+
from ._hud import Hud as Hud
|
|
47
|
+
from ._events import PlayerSpawn as PlayerSpawn
|
|
48
|
+
from ._events import PlayerDeath as PlayerDeath
|
|
49
|
+
from ._events import RoundEvent as RoundEvent
|
|
50
|
+
from ._events import GameMessage as GameMessage
|
|
51
|
+
from ._cs import cs as cs
|
|
52
|
+
from ._cs import CsInfo as CsInfo
|
|
53
|
+
from ._cs import CsContext as CsContext
|
|
54
|
+
from ._cs import CsSnapshot as CsSnapshot
|
|
55
|
+
from ._cs import DamageType as DamageType
|
|
56
|
+
from ._cs import CsHookContext as CsHookContext
|
|
57
|
+
from ._cs import CsHookSnapshot as CsHookSnapshot
|
|
58
|
+
from ._cs_types import CsTrace as CsTrace
|
|
59
|
+
from ._cs_types import CsMovement as CsMovement
|
|
60
|
+
from ._cs_types import CsPhysent as CsPhysent
|
|
61
|
+
from ._cs_types import GameRulesState as GameRulesState
|
|
62
|
+
from ._cs_types import CsLifecycleRecord as CsLifecycleRecord
|
|
63
|
+
from ._effects import effects as effects
|
|
64
|
+
from ._messages import Packet as Packet
|
|
65
|
+
from ._plugins import services as services
|
|
66
|
+
from ._voice import voice as voice
|
|
67
|
+
from ._chat import chat as chat
|
|
68
|
+
from ._i18n import i18n as i18n
|
|
69
|
+
from ._i18n import tr as tr
|
|
70
|
+
from ._simple_db import SQLite as SQLite
|
|
71
|
+
from ._simple_db import Table as Table
|
|
72
|
+
from ._simple_db import Record as Record
|
|
73
|
+
from ._assets import Model as Model
|
|
74
|
+
from ._assets import Sound as Sound
|
|
75
|
+
from ._assets import Sprite as Sprite
|
|
76
|
+
from ._assets import Music as Music
|
|
77
|
+
from ._plugin import Plugin as Plugin
|
|
78
|
+
from ._plugin import Players as Players
|
|
79
|
+
from ._plugin import PlayerGroup as PlayerGroup
|
|
80
|
+
from ._plugin import command as command
|
|
81
|
+
from ._plugin import console_command as console_command
|
|
82
|
+
from ._plugin import every as every
|
|
83
|
+
from ._plugin import hook as hook
|
|
84
|
+
from ._plugin import listen as listen
|
|
85
|
+
from ._plugin import service as service
|
|
86
|
+
from ._plugin import page as page
|
|
87
|
+
from . import hook_events as hook_events
|
|
88
|
+
from ._hook_api import Event as Event
|
|
89
|
+
from ._hook_api import HookEvent as HookEvent
|
|
90
|
+
from ._hook_api import HookSnapshot as HookSnapshot
|
|
91
|
+
from ._timing import Cooldown as Cooldown
|
|
92
|
+
from ._timing import chance as chance
|
|
93
|
+
from ._timing import wait as wait
|
|
94
|
+
from ._schema import Config as Config
|
|
95
|
+
from ._schema import ConfigField as ConfigField
|
|
96
|
+
from ._plugin import Settings as Settings
|
|
97
|
+
from ._player import WeaponState, AmmoState, Rendering
|
|
98
|
+
__version__: str
|
|
99
|
+
|
|
100
|
+
class Player:
|
|
101
|
+
"""RU:
|
|
102
|
+
Игрок и конкретное подключение. Сохранённый объект не начнёт управлять другим игроком при повторном использовании слота.
|
|
103
|
+
|
|
104
|
+
EN:
|
|
105
|
+
A player connection handle. A retained object never targets a different connection reusing the same slot."""
|
|
106
|
+
|
|
107
|
+
@property
|
|
108
|
+
def bounds(self) -> tuple[Vector, Vector]:
|
|
109
|
+
"""RU:
|
|
110
|
+
Фактические границы тела объекта, включая приседание.
|
|
111
|
+
|
|
112
|
+
EN:
|
|
113
|
+
Actual entity hull bounds, including crouching."""
|
|
114
|
+
...
|
|
115
|
+
|
|
116
|
+
@property
|
|
117
|
+
def is_crouching(self) -> bool:
|
|
118
|
+
"""RU:
|
|
119
|
+
Игрок присел.
|
|
120
|
+
|
|
121
|
+
EN:
|
|
122
|
+
Whether the player is crouching."""
|
|
123
|
+
...
|
|
124
|
+
on_ground: bool
|
|
125
|
+
|
|
126
|
+
@property
|
|
127
|
+
def in_air(self) -> bool:
|
|
128
|
+
"""RU:
|
|
129
|
+
Игрок находится в воздухе.
|
|
130
|
+
|
|
131
|
+
EN:
|
|
132
|
+
Whether the player is airborne."""
|
|
133
|
+
...
|
|
134
|
+
|
|
135
|
+
@property
|
|
136
|
+
def speed(self) -> float:
|
|
137
|
+
"""RU:
|
|
138
|
+
Полная скорость в единицах карты в секунду.
|
|
139
|
+
Примечания реализации / Implementation notes:
|
|
140
|
+
Полная скорость игрока.
|
|
141
|
+
|
|
142
|
+
EN:
|
|
143
|
+
Full speed in map units per second.
|
|
144
|
+
Implementation notes / Примечания реализации:
|
|
145
|
+
Полная скорость игрока."""
|
|
146
|
+
...
|
|
147
|
+
|
|
148
|
+
@property
|
|
149
|
+
def horizontal_speed(self) -> float:
|
|
150
|
+
"""RU:
|
|
151
|
+
Горизонтальная скорость в единицах карты в секунду.
|
|
152
|
+
Примечания реализации / Implementation notes:
|
|
153
|
+
Скорость в горизонтальной плоскости.
|
|
154
|
+
|
|
155
|
+
EN:
|
|
156
|
+
Horizontal speed in map units per second.
|
|
157
|
+
Implementation notes / Примечания реализации:
|
|
158
|
+
Скорость в горизонтальной плоскости."""
|
|
159
|
+
...
|
|
160
|
+
|
|
161
|
+
@property
|
|
162
|
+
def is_moving(self) -> bool:
|
|
163
|
+
"""RU:
|
|
164
|
+
Игрок движется со скоростью больше 1.
|
|
165
|
+
|
|
166
|
+
EN:
|
|
167
|
+
Whether the player moves faster than 1 map unit per second."""
|
|
168
|
+
...
|
|
169
|
+
|
|
170
|
+
@property
|
|
171
|
+
def is_playing(self) -> bool:
|
|
172
|
+
"""RU:
|
|
173
|
+
Живой игрок в команде T или CT; вход до выбора команды исключается.
|
|
174
|
+
Примечания реализации / Implementation notes:
|
|
175
|
+
Живой игрок в T/CT. Вход до выбора команды не считается игрой.
|
|
176
|
+
|
|
177
|
+
EN:
|
|
178
|
+
A living player on T or CT; initial connection before team selection is excluded.
|
|
179
|
+
Implementation notes / Примечания реализации:
|
|
180
|
+
Живой игрок в T/CT. Вход до выбора команды не считается игрой."""
|
|
181
|
+
...
|
|
182
|
+
|
|
183
|
+
@property
|
|
184
|
+
def team_id(self) -> Team:
|
|
185
|
+
"""RU:
|
|
186
|
+
Команда как значение Team.
|
|
187
|
+
|
|
188
|
+
EN:
|
|
189
|
+
The team as a Team value."""
|
|
190
|
+
...
|
|
191
|
+
|
|
192
|
+
def in_team(self, team) -> bool:
|
|
193
|
+
"""RU:
|
|
194
|
+
Проверяет команду игрока; используйте Team.T, Team.CT или Team.SPECTATOR.
|
|
195
|
+
Параметры: team.
|
|
196
|
+
|
|
197
|
+
EN:
|
|
198
|
+
Checks the player's team; use Team.T, Team.CT or Team.SPECTATOR.
|
|
199
|
+
Parameters: team."""
|
|
200
|
+
...
|
|
201
|
+
|
|
202
|
+
def inside(self, zone) -> bool:
|
|
203
|
+
"""RU:
|
|
204
|
+
Проверяет нахождение игрока в зоне с учётом размеров тела и фильтра команды.
|
|
205
|
+
Параметры: zone.
|
|
206
|
+
|
|
207
|
+
EN:
|
|
208
|
+
Checks zone membership using the player's hull and the zone's team filter.
|
|
209
|
+
Parameters: zone."""
|
|
210
|
+
...
|
|
211
|
+
|
|
212
|
+
def presses(self, button) -> bool:
|
|
213
|
+
"""RU:
|
|
214
|
+
Проверяет, нажата ли кнопка сейчас; используйте Buttons.JUMP и другие значения Buttons.
|
|
215
|
+
Параметры: button.
|
|
216
|
+
|
|
217
|
+
EN:
|
|
218
|
+
Checks whether a button is currently pressed; use Buttons.JUMP and other Buttons values.
|
|
219
|
+
Parameters: button."""
|
|
220
|
+
...
|
|
221
|
+
|
|
222
|
+
def was_pressing(self, button) -> bool:
|
|
223
|
+
"""RU:
|
|
224
|
+
Проверяет состояние кнопки в предыдущем игровом кадре.
|
|
225
|
+
Параметры: button.
|
|
226
|
+
|
|
227
|
+
EN:
|
|
228
|
+
Checks a button's state in the preceding game frame.
|
|
229
|
+
Parameters: button."""
|
|
230
|
+
...
|
|
231
|
+
|
|
232
|
+
@property
|
|
233
|
+
def is_human(self) -> bool:
|
|
234
|
+
"""RU:
|
|
235
|
+
Обычный игрок, не бот и не HLTV.
|
|
236
|
+
|
|
237
|
+
EN:
|
|
238
|
+
A human player, excluding bots and HLTV."""
|
|
239
|
+
...
|
|
240
|
+
|
|
241
|
+
@property
|
|
242
|
+
def is_swimming(self) -> bool:
|
|
243
|
+
"""RU:
|
|
244
|
+
Игрок погружён в воду как минимум по пояс.
|
|
245
|
+
|
|
246
|
+
EN:
|
|
247
|
+
Whether the player is at least waist-deep in water."""
|
|
248
|
+
...
|
|
249
|
+
|
|
250
|
+
@property
|
|
251
|
+
def is_walking(self) -> bool:
|
|
252
|
+
"""RU:
|
|
253
|
+
Используется обычный тип движения WALK.
|
|
254
|
+
|
|
255
|
+
EN:
|
|
256
|
+
Whether the player uses WALK movement."""
|
|
257
|
+
...
|
|
258
|
+
|
|
259
|
+
def launch(self, up: float=275) -> None:
|
|
260
|
+
"""RU:
|
|
261
|
+
Задаёт вертикальную скорость 0..4000, сохраняя горизонтальную скорость игрока.
|
|
262
|
+
Параметры: up.
|
|
263
|
+
Примечания реализации / Implementation notes:
|
|
264
|
+
Вертикальная скорость прыжка от 0 до 4000. Горизонтальная скорость сохраняется.
|
|
265
|
+
|
|
266
|
+
EN:
|
|
267
|
+
Sets upward velocity from 0 to 4000 while preserving horizontal momentum.
|
|
268
|
+
Parameters: up.
|
|
269
|
+
Implementation notes / Примечания реализации:
|
|
270
|
+
Вертикальная скорость прыжка от 0 до 4000. Горизонтальная скорость сохраняется."""
|
|
271
|
+
...
|
|
272
|
+
|
|
273
|
+
def distance_to(self, other) -> float:
|
|
274
|
+
"""RU:
|
|
275
|
+
Возвращает расстояние до точки или поддерживаемого игрового объекта в единицах карты.
|
|
276
|
+
Параметры: other.
|
|
277
|
+
|
|
278
|
+
EN:
|
|
279
|
+
Returns distance to a point or supported game object in map units.
|
|
280
|
+
Parameters: other."""
|
|
281
|
+
...
|
|
282
|
+
|
|
283
|
+
def nearby(self, radius, *, alive=True) -> PlayerGroup:
|
|
284
|
+
"""RU:
|
|
285
|
+
Возвращает других игроков в радиусе от текущего игрока; alive фильтрует живых.
|
|
286
|
+
Параметры: radius, alive.
|
|
287
|
+
|
|
288
|
+
EN:
|
|
289
|
+
Returns other players within the radius; alive controls the alive-player filter.
|
|
290
|
+
Parameters: radius, alive."""
|
|
291
|
+
...
|
|
292
|
+
|
|
293
|
+
def push_away(self, position: Vector | tuple[float, float, float], *, speed=300, lift=180) -> None:
|
|
294
|
+
"""RU:
|
|
295
|
+
Отталкивает игрока от точки: speed — горизонтальная скорость, lift — подъём.
|
|
296
|
+
Параметры: position, speed, lift.
|
|
297
|
+
|
|
298
|
+
EN:
|
|
299
|
+
Pushes the player away from a point: speed is horizontal velocity and lift is upward velocity.
|
|
300
|
+
Parameters: position, speed, lift."""
|
|
301
|
+
...
|
|
302
|
+
|
|
303
|
+
def glow(self, color: Color | str | tuple[int, int, int] | None='#00AAFF', *, seconds: float=5, amount: float=25) -> Any:
|
|
304
|
+
"""RU:
|
|
305
|
+
Временно задаёт цветное свечение; seconds — время, amount — интенсивность.
|
|
306
|
+
Параметры: color, seconds, amount.
|
|
307
|
+
|
|
308
|
+
EN:
|
|
309
|
+
Applies temporary colored glow; seconds is duration and amount is intensity.
|
|
310
|
+
Parameters: color, seconds, amount."""
|
|
311
|
+
...
|
|
312
|
+
|
|
313
|
+
def set_speed(self, speed, *, seconds: float=10) -> Any:
|
|
314
|
+
"""RU:
|
|
315
|
+
Временно меняет предел скорости игрока; seconds задаёт срок эффекта.
|
|
316
|
+
Параметры: speed, seconds.
|
|
317
|
+
|
|
318
|
+
EN:
|
|
319
|
+
Temporarily changes the player's speed limit; seconds sets effect duration.
|
|
320
|
+
Parameters: speed, seconds."""
|
|
321
|
+
...
|
|
322
|
+
|
|
323
|
+
def set_gravity(self, multiplier, *, seconds: float=10) -> Any:
|
|
324
|
+
"""RU:
|
|
325
|
+
Временно меняет множитель гравитации игрока.
|
|
326
|
+
Параметры: multiplier, seconds.
|
|
327
|
+
|
|
328
|
+
EN:
|
|
329
|
+
Temporarily changes the player's gravity multiplier.
|
|
330
|
+
Parameters: multiplier, seconds."""
|
|
331
|
+
...
|
|
332
|
+
|
|
333
|
+
def give(self, item, *, reserve=None) -> Entity | None:
|
|
334
|
+
"""RU:
|
|
335
|
+
Выдаёт оружие по короткому имени, например 'awp', WeaponId или classname. reserve задаёт запас патронов.
|
|
336
|
+
Параметры: item, reserve.
|
|
337
|
+
Примечания реализации / Implementation notes:
|
|
338
|
+
Выдать оружие, например player.give("awp", reserve=30).
|
|
339
|
+
|
|
340
|
+
EN:
|
|
341
|
+
Gives a short weapon name such as 'awp', WeaponId or classname. reserve sets reserve ammunition.
|
|
342
|
+
Parameters: item, reserve.
|
|
343
|
+
Implementation notes / Примечания реализации:
|
|
344
|
+
Выдать оружие, например player.give("awp", reserve=30)."""
|
|
345
|
+
...
|
|
346
|
+
|
|
347
|
+
def has(self, weapon) -> bool:
|
|
348
|
+
"""RU:
|
|
349
|
+
Проверяет наличие указанного оружия у игрока.
|
|
350
|
+
Параметры: weapon.
|
|
351
|
+
|
|
352
|
+
EN:
|
|
353
|
+
Checks whether the player has the specified weapon.
|
|
354
|
+
Parameters: weapon."""
|
|
355
|
+
...
|
|
356
|
+
|
|
357
|
+
def remove_weapon(self, weapon, *, remove_ammo=False) -> Any:
|
|
358
|
+
"""RU:
|
|
359
|
+
Удаляет указанное оружие у игрока.
|
|
360
|
+
Параметры: weapon, remove_ammo.
|
|
361
|
+
|
|
362
|
+
EN:
|
|
363
|
+
Removes the specified weapon from the player.
|
|
364
|
+
Parameters: weapon, remove_ammo."""
|
|
365
|
+
...
|
|
366
|
+
|
|
367
|
+
async def grant(self, permission: str, *, duration=None) -> Any:
|
|
368
|
+
"""RU:
|
|
369
|
+
Доверенная операция плагина: выдаёт право игроку; пустой срок означает навсегда. Проверяйте полномочия вызывающего перед выдачей.
|
|
370
|
+
Параметры: permission, duration.
|
|
371
|
+
Асинхронный метод: используйте await.
|
|
372
|
+
Примечания реализации / Implementation notes:
|
|
373
|
+
Trusted plugin operation; checks do not grant rights automatically.
|
|
374
|
+
|
|
375
|
+
EN:
|
|
376
|
+
Trusted plugin operation: grants a player permission; an omitted duration means permanent. Check the caller's authority before granting.
|
|
377
|
+
Parameters: permission, duration.
|
|
378
|
+
Asynchronous method: use await.
|
|
379
|
+
Implementation notes / Примечания реализации:
|
|
380
|
+
Trusted plugin operation; checks do not grant rights automatically."""
|
|
381
|
+
...
|
|
382
|
+
|
|
383
|
+
async def revoke(self, permission: str) -> Any:
|
|
384
|
+
"""RU:
|
|
385
|
+
Отзывает прямое право игрока; права групп управляются отдельно.
|
|
386
|
+
Параметры: permission.
|
|
387
|
+
Асинхронный метод: используйте await.
|
|
388
|
+
|
|
389
|
+
EN:
|
|
390
|
+
Revokes a direct player permission; group permissions are managed separately.
|
|
391
|
+
Parameters: permission.
|
|
392
|
+
Asynchronous method: use await."""
|
|
393
|
+
...
|
|
394
|
+
|
|
395
|
+
async def join_group(self, group, *, duration=None) -> Any:
|
|
396
|
+
"""RU:
|
|
397
|
+
Добавляет игрока в группу с необязательным сроком действия.
|
|
398
|
+
Параметры: group, duration.
|
|
399
|
+
Асинхронный метод: используйте await.
|
|
400
|
+
|
|
401
|
+
EN:
|
|
402
|
+
Adds a player to a group with an optional expiration.
|
|
403
|
+
Parameters: group, duration.
|
|
404
|
+
Asynchronous method: use await."""
|
|
405
|
+
...
|
|
406
|
+
|
|
407
|
+
async def leave_group(self, group) -> Any:
|
|
408
|
+
"""RU:
|
|
409
|
+
Удаляет игрока из указанной группы.
|
|
410
|
+
Параметры: group.
|
|
411
|
+
Асинхронный метод: используйте await.
|
|
412
|
+
|
|
413
|
+
EN:
|
|
414
|
+
Removes a player from the named group.
|
|
415
|
+
Parameters: group.
|
|
416
|
+
Asynchronous method: use await."""
|
|
417
|
+
...
|
|
418
|
+
|
|
419
|
+
@property
|
|
420
|
+
def nightvision(self) -> Any:
|
|
421
|
+
"""RU:
|
|
422
|
+
API PyMod: Player.nightvision. Сигнатура и исходные примечания приведены ниже.
|
|
423
|
+
|
|
424
|
+
EN:
|
|
425
|
+
PyMod API: Player.nightvision. See the signature and original implementation notes below."""
|
|
426
|
+
...
|
|
427
|
+
|
|
428
|
+
@nightvision.setter
|
|
429
|
+
def nightvision(self, value) -> None:
|
|
430
|
+
"""RU:
|
|
431
|
+
API PyMod: Player.nightvision. Сигнатура и исходные примечания приведены ниже.
|
|
432
|
+
Параметры: value.
|
|
433
|
+
|
|
434
|
+
EN:
|
|
435
|
+
PyMod API: Player.nightvision. See the signature and original implementation notes below.
|
|
436
|
+
Parameters: value."""
|
|
437
|
+
...
|
|
438
|
+
|
|
439
|
+
@property
|
|
440
|
+
def address(self) -> Any:
|
|
441
|
+
"""RU:
|
|
442
|
+
API PyMod: Player.address. Сигнатура и исходные примечания приведены ниже.
|
|
443
|
+
Примечания реализации / Implementation notes:
|
|
444
|
+
Normalized connection IP, without port or authentication credentials.
|
|
445
|
+
|
|
446
|
+
EN:
|
|
447
|
+
PyMod API: Player.address. See the signature and original implementation notes below.
|
|
448
|
+
Implementation notes / Примечания реализации:
|
|
449
|
+
Normalized connection IP, without port or authentication credentials."""
|
|
450
|
+
...
|
|
451
|
+
|
|
452
|
+
def ammo(self, weapon) -> Any:
|
|
453
|
+
"""RU:
|
|
454
|
+
Читает количество патронов выбранного оружия.
|
|
455
|
+
Параметры: weapon.
|
|
456
|
+
Примечания реализации / Implementation notes:
|
|
457
|
+
Actual clip/reserve via the optional ReGameDLL PyMod interface.
|
|
458
|
+
|
|
459
|
+
EN:
|
|
460
|
+
Reads ammunition counts for the selected weapon.
|
|
461
|
+
Parameters: weapon.
|
|
462
|
+
Implementation notes / Примечания реализации:
|
|
463
|
+
Actual clip/reserve via the optional ReGameDLL PyMod interface."""
|
|
464
|
+
...
|
|
465
|
+
|
|
466
|
+
def set_ammo(self, weapon, *, clip=None, reserve=None) -> Any:
|
|
467
|
+
"""RU:
|
|
468
|
+
Меняет патроны в магазине и/или запасе указанного оружия.
|
|
469
|
+
Параметры: weapon, clip, reserve.
|
|
470
|
+
|
|
471
|
+
EN:
|
|
472
|
+
Changes clip and/or reserve ammunition for the selected weapon.
|
|
473
|
+
Parameters: weapon, clip, reserve."""
|
|
474
|
+
...
|
|
475
|
+
|
|
476
|
+
def set_score(self, *, frags=0, deaths=0) -> Any:
|
|
477
|
+
"""RU:
|
|
478
|
+
Устанавливает фраги и смерти игрока.
|
|
479
|
+
Параметры: frags, deaths.
|
|
480
|
+
|
|
481
|
+
EN:
|
|
482
|
+
Sets the player's frags and deaths.
|
|
483
|
+
Parameters: frags, deaths."""
|
|
484
|
+
...
|
|
485
|
+
|
|
486
|
+
def add_account(self, amount: float) -> Any:
|
|
487
|
+
"""RU:
|
|
488
|
+
Изменяет встроенные деньги Counter-Strike.
|
|
489
|
+
Параметры: amount.
|
|
490
|
+
Примечания реализации / Implementation notes:
|
|
491
|
+
Change the built-in CS account through ReGameDLL AddAccount.
|
|
492
|
+
|
|
493
|
+
EN:
|
|
494
|
+
Changes the built-in Counter-Strike money balance.
|
|
495
|
+
Parameters: amount.
|
|
496
|
+
Implementation notes / Примечания реализации:
|
|
497
|
+
Change the built-in CS account through ReGameDLL AddAccount."""
|
|
498
|
+
...
|
|
499
|
+
|
|
500
|
+
@property
|
|
501
|
+
def money(self) -> Any:
|
|
502
|
+
"""RU:
|
|
503
|
+
Встроенные деньги CS.
|
|
504
|
+
Примечания реализации / Implementation notes:
|
|
505
|
+
Latest built-in CS Money update. Raises before the first update.
|
|
506
|
+
|
|
507
|
+
EN:
|
|
508
|
+
Built-in CS money balance.
|
|
509
|
+
Implementation notes / Примечания реализации:
|
|
510
|
+
Latest built-in CS Money update. Raises before the first update."""
|
|
511
|
+
...
|
|
512
|
+
|
|
513
|
+
@property
|
|
514
|
+
def frags(self) -> int:
|
|
515
|
+
"""RU:
|
|
516
|
+
Количество фрагов.
|
|
517
|
+
|
|
518
|
+
EN:
|
|
519
|
+
Frag count."""
|
|
520
|
+
...
|
|
521
|
+
|
|
522
|
+
@property
|
|
523
|
+
def deaths(self) -> int:
|
|
524
|
+
"""RU:
|
|
525
|
+
Количество смертей.
|
|
526
|
+
|
|
527
|
+
EN:
|
|
528
|
+
Death count."""
|
|
529
|
+
...
|
|
530
|
+
|
|
531
|
+
def drop_primary(self) -> Any:
|
|
532
|
+
"""RU:
|
|
533
|
+
Выбрасывает основное оружие игрока.
|
|
534
|
+
|
|
535
|
+
EN:
|
|
536
|
+
Drops the player's primary weapon."""
|
|
537
|
+
...
|
|
538
|
+
|
|
539
|
+
@property
|
|
540
|
+
def active_weapon(self) -> Any:
|
|
541
|
+
"""RU:
|
|
542
|
+
API PyMod: Player.active_weapon. Сигнатура и исходные примечания приведены ниже.
|
|
543
|
+
Примечания реализации / Implementation notes:
|
|
544
|
+
Latest CurWeapon observation, or None before the first active update.
|
|
545
|
+
|
|
546
|
+
EN:
|
|
547
|
+
PyMod API: Player.active_weapon. See the signature and original implementation notes below.
|
|
548
|
+
Implementation notes / Примечания реализации:
|
|
549
|
+
Latest CurWeapon observation, or None before the first active update."""
|
|
550
|
+
...
|
|
551
|
+
|
|
552
|
+
@property
|
|
553
|
+
def view_model(self) -> Any:
|
|
554
|
+
"""RU:
|
|
555
|
+
API PyMod: Player.view_model. Сигнатура и исходные примечания приведены ниже.
|
|
556
|
+
Примечания реализации / Implementation notes:
|
|
557
|
+
Current engine first-person model; reflects Deploy before CurWeapon.
|
|
558
|
+
|
|
559
|
+
EN:
|
|
560
|
+
PyMod API: Player.view_model. See the signature and original implementation notes below.
|
|
561
|
+
Implementation notes / Примечания реализации:
|
|
562
|
+
Current engine first-person model; reflects Deploy before CurWeapon."""
|
|
563
|
+
...
|
|
564
|
+
|
|
565
|
+
def drop_secondary(self) -> Any:
|
|
566
|
+
"""RU:
|
|
567
|
+
Выбрасывает пистолет игрока.
|
|
568
|
+
|
|
569
|
+
EN:
|
|
570
|
+
Drops the player's secondary weapon."""
|
|
571
|
+
...
|
|
572
|
+
|
|
573
|
+
def remove_item(self, classname: str, *, remove_ammo=False) -> Any:
|
|
574
|
+
"""RU:
|
|
575
|
+
Удаляет предмет игрока по classname.
|
|
576
|
+
Параметры: classname, remove_ammo.
|
|
577
|
+
|
|
578
|
+
EN:
|
|
579
|
+
Removes a player item by classname.
|
|
580
|
+
Parameters: classname, remove_ammo."""
|
|
581
|
+
...
|
|
582
|
+
|
|
583
|
+
def join_team(self, team) -> Any:
|
|
584
|
+
"""RU:
|
|
585
|
+
Переводит игрока в указанную команду через игровой API.
|
|
586
|
+
Параметры: team.
|
|
587
|
+
Примечания реализации / Implementation notes:
|
|
588
|
+
ReGameDLL JoinTeam performs observer/team state transitions.
|
|
589
|
+
|
|
590
|
+
EN:
|
|
591
|
+
Moves the player to a team through the game API.
|
|
592
|
+
Parameters: team.
|
|
593
|
+
Implementation notes / Примечания реализации:
|
|
594
|
+
ReGameDLL JoinTeam performs observer/team state transitions."""
|
|
595
|
+
...
|
|
596
|
+
|
|
597
|
+
def set_model(self, path) -> Any:
|
|
598
|
+
"""RU:
|
|
599
|
+
Назначает модель игроку.
|
|
600
|
+
Параметры: path.
|
|
601
|
+
|
|
602
|
+
EN:
|
|
603
|
+
Assigns the player's model.
|
|
604
|
+
Parameters: path."""
|
|
605
|
+
...
|
|
606
|
+
|
|
607
|
+
def reset_model(self) -> Any:
|
|
608
|
+
"""RU:
|
|
609
|
+
Восстанавливает стандартную модель игрока.
|
|
610
|
+
|
|
611
|
+
EN:
|
|
612
|
+
Restores the player's default model."""
|
|
613
|
+
...
|
|
614
|
+
|
|
615
|
+
def reload_weapons(self, *, refill=False) -> Any:
|
|
616
|
+
"""RU:
|
|
617
|
+
Запрашивает перезарядку оружия через GameDLL.
|
|
618
|
+
Параметры: refill.
|
|
619
|
+
|
|
620
|
+
EN:
|
|
621
|
+
Requests weapon reloading through GameDLL.
|
|
622
|
+
Parameters: refill."""
|
|
623
|
+
...
|
|
624
|
+
|
|
625
|
+
def set_animation(self, animation) -> None:
|
|
626
|
+
"""RU:
|
|
627
|
+
Устанавливает анимацию игрока через GameDLL.
|
|
628
|
+
Параметры: animation.
|
|
629
|
+
|
|
630
|
+
EN:
|
|
631
|
+
Sets a player animation through GameDLL.
|
|
632
|
+
Parameters: animation."""
|
|
633
|
+
...
|
|
634
|
+
|
|
635
|
+
def client_command(self, command, *args) -> None:
|
|
636
|
+
"""RU:
|
|
637
|
+
Отправляет разрешённую клиентскую команду отдельному игроку; аргументы передаются отдельно.
|
|
638
|
+
Параметры: command.
|
|
639
|
+
Примечания реализации / Implementation notes:
|
|
640
|
+
Queue one command; client restrictions may decline it. No separators.
|
|
641
|
+
|
|
642
|
+
EN:
|
|
643
|
+
Sends an allowed client command to one player; pass arguments separately.
|
|
644
|
+
Parameters: command.
|
|
645
|
+
Implementation notes / Примечания реализации:
|
|
646
|
+
Queue one command; client restrictions may decline it. No separators."""
|
|
647
|
+
...
|
|
648
|
+
|
|
649
|
+
@property
|
|
650
|
+
def is_bot(self) -> bool:
|
|
651
|
+
"""RU:
|
|
652
|
+
Подключение является ботом.
|
|
653
|
+
|
|
654
|
+
EN:
|
|
655
|
+
Whether the connection is a bot."""
|
|
656
|
+
...
|
|
657
|
+
|
|
658
|
+
@property
|
|
659
|
+
def is_hltv(self) -> bool:
|
|
660
|
+
"""RU:
|
|
661
|
+
Подключение является HLTV.
|
|
662
|
+
|
|
663
|
+
EN:
|
|
664
|
+
Whether the connection is HLTV."""
|
|
665
|
+
...
|
|
666
|
+
|
|
667
|
+
@property
|
|
668
|
+
def ping(self) -> int:
|
|
669
|
+
"""RU:
|
|
670
|
+
API PyMod: Player.ping. Сигнатура и исходные примечания приведены ниже.
|
|
671
|
+
|
|
672
|
+
EN:
|
|
673
|
+
PyMod API: Player.ping. See the signature and original implementation notes below."""
|
|
674
|
+
...
|
|
675
|
+
|
|
676
|
+
@property
|
|
677
|
+
def packet_loss(self) -> int:
|
|
678
|
+
"""RU:
|
|
679
|
+
API PyMod: Player.packet_loss. Сигнатура и исходные примечания приведены ниже.
|
|
680
|
+
|
|
681
|
+
EN:
|
|
682
|
+
PyMod API: Player.packet_loss. See the signature and original implementation notes below."""
|
|
683
|
+
...
|
|
684
|
+
|
|
685
|
+
@property
|
|
686
|
+
def observer_target(self) -> Player | None:
|
|
687
|
+
"""RU:
|
|
688
|
+
API PyMod: Player.observer_target. Сигнатура и исходные примечания приведены ниже.
|
|
689
|
+
|
|
690
|
+
EN:
|
|
691
|
+
PyMod API: Player.observer_target. See the signature and original implementation notes below."""
|
|
692
|
+
...
|
|
693
|
+
|
|
694
|
+
def give_item(self, classname: str) -> Entity | None:
|
|
695
|
+
"""RU:
|
|
696
|
+
Выдаёт предмет по classname и возвращает объект предмета, если он создан.
|
|
697
|
+
Параметры: classname.
|
|
698
|
+
|
|
699
|
+
EN:
|
|
700
|
+
Gives an item by classname and returns its entity if created.
|
|
701
|
+
Parameters: classname."""
|
|
702
|
+
...
|
|
703
|
+
|
|
704
|
+
def strip_items(self) -> None:
|
|
705
|
+
"""RU:
|
|
706
|
+
Удаляет предметы из инвентаря игрока.
|
|
707
|
+
|
|
708
|
+
EN:
|
|
709
|
+
Removes items from the player's inventory."""
|
|
710
|
+
...
|
|
711
|
+
|
|
712
|
+
def give_ammo(self, amount: int, ammo, *, maximum=-1) -> int:
|
|
713
|
+
"""RU:
|
|
714
|
+
Выдаёт патроны выбранного типа и возвращает результат GameDLL.
|
|
715
|
+
Параметры: amount, ammo, maximum.
|
|
716
|
+
|
|
717
|
+
EN:
|
|
718
|
+
Gives ammunition of the selected type and returns the GameDLL result.
|
|
719
|
+
Parameters: amount, ammo, maximum."""
|
|
720
|
+
...
|
|
721
|
+
|
|
722
|
+
@property
|
|
723
|
+
def weapons(self) -> tuple[WeaponState, ...]:
|
|
724
|
+
"""RU:
|
|
725
|
+
Оружие в инвентаре игрока.
|
|
726
|
+
|
|
727
|
+
EN:
|
|
728
|
+
Weapons in the player's inventory."""
|
|
729
|
+
...
|
|
730
|
+
|
|
731
|
+
def has_weapon(self, weapon) -> bool:
|
|
732
|
+
"""RU:
|
|
733
|
+
Проверяет наличие оружия в инвентаре игрока.
|
|
734
|
+
Параметры: weapon.
|
|
735
|
+
|
|
736
|
+
EN:
|
|
737
|
+
Checks whether the player's inventory contains a weapon.
|
|
738
|
+
Parameters: weapon."""
|
|
739
|
+
...
|
|
740
|
+
|
|
741
|
+
def take_damage(self, amount: float, *, damage_type=0, attacker=None, inflictor=None) -> bool:
|
|
742
|
+
"""RU:
|
|
743
|
+
Наносит урон через игровой API с указанным источником и типом.
|
|
744
|
+
Параметры: amount, damage_type, attacker, inflictor.
|
|
745
|
+
|
|
746
|
+
EN:
|
|
747
|
+
Applies damage through the game API with the specified source and damage type.
|
|
748
|
+
Parameters: amount, damage_type, attacker, inflictor."""
|
|
749
|
+
...
|
|
750
|
+
|
|
751
|
+
def heal(self, amount: float=100, *, maximum=None, damage_type=0) -> bool | float:
|
|
752
|
+
"""RU:
|
|
753
|
+
Лечит игрока. Ограниченный вариант с maximum возвращает фактическую прибавку; обычный вызов использует GameDLL.
|
|
754
|
+
Параметры: amount, maximum, damage_type.
|
|
755
|
+
Примечания реализации / Implementation notes:
|
|
756
|
+
Normal healing uses GameDLL; explicit maximum permits bounded bonus HP.
|
|
757
|
+
|
|
758
|
+
EN:
|
|
759
|
+
Heals a player. The bounded maximum variant returns the actual increase; the ordinary call uses GameDLL.
|
|
760
|
+
Parameters: amount, maximum, damage_type.
|
|
761
|
+
Implementation notes / Примечания реализации:
|
|
762
|
+
Normal healing uses GameDLL; explicit maximum permits bounded bonus HP."""
|
|
763
|
+
...
|
|
764
|
+
|
|
765
|
+
def kill(self, *, attacker=None, gib=0) -> None:
|
|
766
|
+
"""RU:
|
|
767
|
+
Убивает игрока через игровой API.
|
|
768
|
+
Параметры: attacker, gib.
|
|
769
|
+
|
|
770
|
+
EN:
|
|
771
|
+
Kills the player through the game API.
|
|
772
|
+
Parameters: attacker, gib."""
|
|
773
|
+
...
|
|
774
|
+
|
|
775
|
+
def respawn(self) -> bool:
|
|
776
|
+
"""RU:
|
|
777
|
+
Возрождает игрока через GameDLL; результат сообщает об успешности операции.
|
|
778
|
+
|
|
779
|
+
EN:
|
|
780
|
+
Respawns the player through GameDLL; returns whether the operation succeeded."""
|
|
781
|
+
...
|
|
782
|
+
|
|
783
|
+
def reset_max_speed(self) -> None:
|
|
784
|
+
"""RU:
|
|
785
|
+
Пересчитывает предельную скорость игрока по правилам игры.
|
|
786
|
+
|
|
787
|
+
EN:
|
|
788
|
+
Recalculates the player's maximum speed using game rules."""
|
|
789
|
+
...
|
|
790
|
+
|
|
791
|
+
@property
|
|
792
|
+
def team(self) -> str:
|
|
793
|
+
"""RU:
|
|
794
|
+
Команда игрока.
|
|
795
|
+
|
|
796
|
+
EN:
|
|
797
|
+
The player's team."""
|
|
798
|
+
...
|
|
799
|
+
|
|
800
|
+
def add_frags(self, amount: float, *, allow_negative=False) -> Any:
|
|
801
|
+
"""RU:
|
|
802
|
+
Изменяет количество фрагов игрока.
|
|
803
|
+
Параметры: amount, allow_negative.
|
|
804
|
+
|
|
805
|
+
EN:
|
|
806
|
+
Changes the player's frag count.
|
|
807
|
+
Parameters: amount, allow_negative."""
|
|
808
|
+
...
|
|
809
|
+
|
|
810
|
+
@property
|
|
811
|
+
def rendering(self) -> Any:
|
|
812
|
+
"""RU:
|
|
813
|
+
API PyMod: Player.rendering. Сигнатура и исходные примечания приведены ниже.
|
|
814
|
+
|
|
815
|
+
EN:
|
|
816
|
+
PyMod API: Player.rendering. See the signature and original implementation notes below."""
|
|
817
|
+
...
|
|
818
|
+
|
|
819
|
+
@rendering.setter
|
|
820
|
+
def rendering(self, style) -> None:
|
|
821
|
+
"""RU:
|
|
822
|
+
API PyMod: Player.rendering. Сигнатура и исходные примечания приведены ниже.
|
|
823
|
+
Параметры: style.
|
|
824
|
+
|
|
825
|
+
EN:
|
|
826
|
+
PyMod API: Player.rendering. See the signature and original implementation notes below.
|
|
827
|
+
Parameters: style."""
|
|
828
|
+
...
|
|
829
|
+
|
|
830
|
+
@property
|
|
831
|
+
def eye_position(self) -> Vector:
|
|
832
|
+
"""RU:
|
|
833
|
+
API PyMod: Player.eye_position. Сигнатура и исходные примечания приведены ниже.
|
|
834
|
+
|
|
835
|
+
EN:
|
|
836
|
+
PyMod API: Player.eye_position. See the signature and original implementation notes below."""
|
|
837
|
+
...
|
|
838
|
+
|
|
839
|
+
def look_at(self, distance=4096, *, ignore_players=False) -> Trace:
|
|
840
|
+
"""RU:
|
|
841
|
+
Трассирует направление взгляда и возвращает Trace с точкой и объектом попадания.
|
|
842
|
+
Параметры: distance, ignore_players.
|
|
843
|
+
Примечания реализации / Implementation notes:
|
|
844
|
+
Trace from the CS player's eyes; returns hit/end/fraction, not a raw tuple.
|
|
845
|
+
|
|
846
|
+
EN:
|
|
847
|
+
Traces along the player's view and returns Trace with the endpoint and hit entity.
|
|
848
|
+
Parameters: distance, ignore_players.
|
|
849
|
+
Implementation notes / Примечания реализации:
|
|
850
|
+
Trace from the CS player's eyes; returns hit/end/fraction, not a raw tuple."""
|
|
851
|
+
...
|
|
852
|
+
|
|
853
|
+
def teleport(self, position: Vector | tuple[float, float, float], *, stop=True) -> None:
|
|
854
|
+
"""RU:
|
|
855
|
+
Перемещает игрока в указанные координаты; дополнительные параметры управляют направлением и скоростью.
|
|
856
|
+
Параметры: position, stop.
|
|
857
|
+
Примечания реализации / Implementation notes:
|
|
858
|
+
Relink through the engine; use look_at/trace to choose a safe destination.
|
|
859
|
+
|
|
860
|
+
EN:
|
|
861
|
+
Teleports the player to coordinates; optional parameters control orientation and velocity.
|
|
862
|
+
Parameters: position, stop.
|
|
863
|
+
Implementation notes / Примечания реализации:
|
|
864
|
+
Relink through the engine; use look_at/trace to choose a safe destination."""
|
|
865
|
+
...
|
|
866
|
+
|
|
867
|
+
def accelerate_forward(self, amount: float, *, maximum_speed=1200, horizontal=True) -> None:
|
|
868
|
+
"""RU:
|
|
869
|
+
API PyMod: Player.accelerate_forward. Сигнатура и исходные примечания приведены ниже.
|
|
870
|
+
Параметры: amount, maximum_speed, horizontal.
|
|
871
|
+
|
|
872
|
+
EN:
|
|
873
|
+
PyMod API: Player.accelerate_forward. See the signature and original implementation notes below.
|
|
874
|
+
Parameters: amount, maximum_speed, horizontal."""
|
|
875
|
+
...
|
|
876
|
+
movement: Movement
|
|
877
|
+
origin: Vector
|
|
878
|
+
velocity: Vector
|
|
879
|
+
base_velocity: Vector
|
|
880
|
+
punch_angle: Vector
|
|
881
|
+
view_angles: Vector
|
|
882
|
+
buttons: Buttons
|
|
883
|
+
old_buttons: Buttons
|
|
884
|
+
move_type: MoveType
|
|
885
|
+
gravity: float
|
|
886
|
+
friction: float
|
|
887
|
+
max_speed: float
|
|
888
|
+
jump_slowdown: float
|
|
889
|
+
flags: PlayerFlags
|
|
890
|
+
water_level: int
|
|
891
|
+
|
|
892
|
+
def __init__(self, index, token) -> None:
|
|
893
|
+
...
|
|
894
|
+
|
|
895
|
+
def __eq__(self, other) -> Any:
|
|
896
|
+
...
|
|
897
|
+
|
|
898
|
+
def __hash__(self) -> Any:
|
|
899
|
+
...
|
|
900
|
+
|
|
901
|
+
@property
|
|
902
|
+
def index(self) -> int:
|
|
903
|
+
"""RU:
|
|
904
|
+
Номер игрового слота.
|
|
905
|
+
|
|
906
|
+
EN:
|
|
907
|
+
Engine slot index."""
|
|
908
|
+
...
|
|
909
|
+
|
|
910
|
+
@property
|
|
911
|
+
def token(self) -> int:
|
|
912
|
+
"""RU:
|
|
913
|
+
Идентификатор конкретного подключения.
|
|
914
|
+
|
|
915
|
+
EN:
|
|
916
|
+
Token identifying this exact connection."""
|
|
917
|
+
...
|
|
918
|
+
|
|
919
|
+
@property
|
|
920
|
+
def entity(self) -> Entity:
|
|
921
|
+
"""RU:
|
|
922
|
+
Игровой объект игрока.
|
|
923
|
+
|
|
924
|
+
EN:
|
|
925
|
+
The player's game entity."""
|
|
926
|
+
...
|
|
927
|
+
|
|
928
|
+
@property
|
|
929
|
+
def connected(self) -> bool:
|
|
930
|
+
"""RU:
|
|
931
|
+
Подключён ли ещё именно этот игрок.
|
|
932
|
+
|
|
933
|
+
EN:
|
|
934
|
+
Whether this exact player connection is still active."""
|
|
935
|
+
...
|
|
936
|
+
|
|
937
|
+
@property
|
|
938
|
+
def name(self) -> str:
|
|
939
|
+
"""RU:
|
|
940
|
+
Текущее имя игрока.
|
|
941
|
+
|
|
942
|
+
EN:
|
|
943
|
+
Current player name."""
|
|
944
|
+
...
|
|
945
|
+
|
|
946
|
+
@property
|
|
947
|
+
def steam_id(self) -> str:
|
|
948
|
+
"""RU:
|
|
949
|
+
Идентификатор Steam подключения.
|
|
950
|
+
|
|
951
|
+
EN:
|
|
952
|
+
Connection Steam ID."""
|
|
953
|
+
...
|
|
954
|
+
|
|
955
|
+
@property
|
|
956
|
+
def userid(self) -> int:
|
|
957
|
+
"""RU:
|
|
958
|
+
Серверный userid подключения.
|
|
959
|
+
|
|
960
|
+
EN:
|
|
961
|
+
Server userid for this connection."""
|
|
962
|
+
...
|
|
963
|
+
|
|
964
|
+
@property
|
|
965
|
+
def alive(self) -> bool:
|
|
966
|
+
"""RU:
|
|
967
|
+
Жив ли игрок.
|
|
968
|
+
|
|
969
|
+
EN:
|
|
970
|
+
Whether the player is alive."""
|
|
971
|
+
...
|
|
972
|
+
|
|
973
|
+
@property
|
|
974
|
+
def observing(self) -> bool:
|
|
975
|
+
"""RU:
|
|
976
|
+
Режим наблюдения, включая мёртвых игроков.
|
|
977
|
+
Примечания реализации / Implementation notes:
|
|
978
|
+
In observer mode, including spectators and dead players watching others.
|
|
979
|
+
|
|
980
|
+
EN:
|
|
981
|
+
Observer mode, including dead players watching others.
|
|
982
|
+
Implementation notes / Примечания реализации:
|
|
983
|
+
In observer mode, including spectators and dead players watching others."""
|
|
984
|
+
...
|
|
985
|
+
|
|
986
|
+
@property
|
|
987
|
+
def health(self) -> float:
|
|
988
|
+
"""RU:
|
|
989
|
+
Количество здоровья игрока.
|
|
990
|
+
|
|
991
|
+
EN:
|
|
992
|
+
The player's health."""
|
|
993
|
+
...
|
|
994
|
+
|
|
995
|
+
@health.setter
|
|
996
|
+
def health(self, value) -> None:
|
|
997
|
+
"""RU:
|
|
998
|
+
API PyMod: Player.health. Сигнатура и исходные примечания приведены ниже.
|
|
999
|
+
Параметры: value.
|
|
1000
|
+
|
|
1001
|
+
EN:
|
|
1002
|
+
PyMod API: Player.health. See the signature and original implementation notes below.
|
|
1003
|
+
Parameters: value."""
|
|
1004
|
+
...
|
|
1005
|
+
|
|
1006
|
+
@property
|
|
1007
|
+
def armor(self) -> float:
|
|
1008
|
+
"""RU:
|
|
1009
|
+
Количество брони игрока.
|
|
1010
|
+
|
|
1011
|
+
EN:
|
|
1012
|
+
The player's armor."""
|
|
1013
|
+
...
|
|
1014
|
+
|
|
1015
|
+
@armor.setter
|
|
1016
|
+
def armor(self, value) -> None:
|
|
1017
|
+
"""RU:
|
|
1018
|
+
API PyMod: Player.armor. Сигнатура и исходные примечания приведены ниже.
|
|
1019
|
+
Параметры: value.
|
|
1020
|
+
|
|
1021
|
+
EN:
|
|
1022
|
+
PyMod API: Player.armor. See the signature and original implementation notes below.
|
|
1023
|
+
Parameters: value."""
|
|
1024
|
+
...
|
|
1025
|
+
|
|
1026
|
+
def say(self, message: str, *, color: Color | str | tuple[int, int, int] | None=None, prefix=None, **values) -> None:
|
|
1027
|
+
"""RU:
|
|
1028
|
+
Отправляет сообщение игроку. color — цвет, prefix — префикс этого сообщения; цвета чата ограничены палитрой CS.
|
|
1029
|
+
Параметры: message, color, prefix.
|
|
1030
|
+
Примечания реализации / Implementation notes:
|
|
1031
|
+
Сообщение конкретному игроку. prefix задаёт префикс этого сообщения; HEX чата переводится в палитру CS.
|
|
1032
|
+
|
|
1033
|
+
EN:
|
|
1034
|
+
Sends a player a chat message. color sets color and prefix sets this message's prefix; CS chat has a limited palette.
|
|
1035
|
+
Parameters: message, color, prefix.
|
|
1036
|
+
Implementation notes / Примечания реализации:
|
|
1037
|
+
Сообщение конкретному игроку. prefix задаёт префикс этого сообщения; HEX чата переводится в палитру CS."""
|
|
1038
|
+
...
|
|
1039
|
+
message = say
|
|
1040
|
+
|
|
1041
|
+
def in_group(self, name) -> bool:
|
|
1042
|
+
"""RU:
|
|
1043
|
+
Проверяет членство игрока в указанной группе.
|
|
1044
|
+
Параметры: name.
|
|
1045
|
+
|
|
1046
|
+
EN:
|
|
1047
|
+
Checks whether the player belongs to the named group.
|
|
1048
|
+
Parameters: name."""
|
|
1049
|
+
...
|
|
1050
|
+
|
|
1051
|
+
def sound(self, resource) -> Any:
|
|
1052
|
+
"""RU:
|
|
1053
|
+
API PyMod: Player.sound. Сигнатура и исходные примечания приведены ниже.
|
|
1054
|
+
Параметры: resource.
|
|
1055
|
+
|
|
1056
|
+
EN:
|
|
1057
|
+
PyMod API: Player.sound. See the signature and original implementation notes below.
|
|
1058
|
+
Parameters: resource."""
|
|
1059
|
+
...
|
|
1060
|
+
|
|
1061
|
+
def hud(self, text: str, *, color: Color | str | tuple[int, int, int] | None=None, seconds: float=3, position: Position | str | None=None, x: float=-1, y: float=0.2, channel: int | None=None) -> None:
|
|
1062
|
+
"""RU:
|
|
1063
|
+
Показывает HUD-сообщение: text — текст, seconds — секунды, position — Position или имя, color — Color/HEX/RGB.
|
|
1064
|
+
Параметры: text, color, seconds, position, x, y, channel.
|
|
1065
|
+
Примечания реализации / Implementation notes:
|
|
1066
|
+
Показать HUD игроку. position=Position.Center / Top / percent(...); seconds — время, color — RGB/HEX.
|
|
1067
|
+
|
|
1068
|
+
EN:
|
|
1069
|
+
Shows a HUD message: text, seconds of visibility, position as Position or a name, and color as Color/HEX/RGB.
|
|
1070
|
+
Parameters: text, color, seconds, position, x, y, channel.
|
|
1071
|
+
Implementation notes / Примечания реализации:
|
|
1072
|
+
Показать HUD игроку. position=Position.Center / Top / percent(...); seconds — время, color — RGB/HEX."""
|
|
1073
|
+
...
|
|
1074
|
+
|
|
1075
|
+
def console(self, message: str) -> None:
|
|
1076
|
+
"""RU:
|
|
1077
|
+
Печатает сообщение в игровой консоли игрока.
|
|
1078
|
+
Параметры: message.
|
|
1079
|
+
|
|
1080
|
+
EN:
|
|
1081
|
+
Prints a message in the player's game console.
|
|
1082
|
+
Parameters: message."""
|
|
1083
|
+
...
|
|
1084
|
+
|
|
1085
|
+
def kick(self, reason: str='Kicked by administrator') -> None:
|
|
1086
|
+
"""RU:
|
|
1087
|
+
Отключает конкретное подключение игрока с указанной причиной.
|
|
1088
|
+
Параметры: reason.
|
|
1089
|
+
|
|
1090
|
+
EN:
|
|
1091
|
+
Disconnects this exact player connection with the supplied reason.
|
|
1092
|
+
Parameters: reason."""
|
|
1093
|
+
...
|
|
1094
|
+
|
|
1095
|
+
def has_permission(self, permission: str) -> bool:
|
|
1096
|
+
"""RU:
|
|
1097
|
+
Проверяет наличие права у игрока с учётом групп и срока действия.
|
|
1098
|
+
Параметры: permission.
|
|
1099
|
+
|
|
1100
|
+
EN:
|
|
1101
|
+
Checks a player's permission including group membership and expiration.
|
|
1102
|
+
Parameters: permission."""
|
|
1103
|
+
...
|
|
1104
|
+
|
|
1105
|
+
def can(self, permission: str, *, description: str=None) -> bool:
|
|
1106
|
+
"""RU:
|
|
1107
|
+
Проверяет прямые права игрока и права его групп. Регистрирует неизвестное право, но не выдаёт его.
|
|
1108
|
+
Параметры: permission, description.
|
|
1109
|
+
Примечания реализации / Implementation notes:
|
|
1110
|
+
Проверяет право игрока и его групп. Само право автоматически регистрируется, но не выдаётся.
|
|
1111
|
+
|
|
1112
|
+
EN:
|
|
1113
|
+
Checks direct and inherited group permissions. Registers an unknown permission but never grants it.
|
|
1114
|
+
Parameters: permission, description.
|
|
1115
|
+
Implementation notes / Примечания реализации:
|
|
1116
|
+
Проверяет право игрока и его групп. Само право автоматически регистрируется, но не выдаётся."""
|
|
1117
|
+
...
|
|
1118
|
+
|
|
1119
|
+
def can_any(self, *names) -> bool:
|
|
1120
|
+
"""RU:
|
|
1121
|
+
Истина, если у игрока есть хотя бы одно из перечисленных прав.
|
|
1122
|
+
Примечания реализации / Implementation notes:
|
|
1123
|
+
Any exact permission; all names are automatically registered.
|
|
1124
|
+
|
|
1125
|
+
EN:
|
|
1126
|
+
True if the player has at least one of the listed permissions.
|
|
1127
|
+
Implementation notes / Примечания реализации:
|
|
1128
|
+
Any exact permission; all names are automatically registered."""
|
|
1129
|
+
...
|
|
1130
|
+
|
|
1131
|
+
def can_all(self, *names) -> bool:
|
|
1132
|
+
"""RU:
|
|
1133
|
+
Истина, если у игрока есть все перечисленные права.
|
|
1134
|
+
Примечания реализации / Implementation notes:
|
|
1135
|
+
Every exact permission; an empty request never grants access.
|
|
1136
|
+
|
|
1137
|
+
EN:
|
|
1138
|
+
True if the player has every listed permission.
|
|
1139
|
+
Implementation notes / Примечания реализации:
|
|
1140
|
+
Every exact permission; an empty request never grants access."""
|
|
1141
|
+
...
|
|
1142
|
+
|
|
1143
|
+
def add_armor(self, amount: float=100, *, maximum=100) -> float:
|
|
1144
|
+
"""RU:
|
|
1145
|
+
Добавляет броню с ограничением maximum и возвращает фактическую прибавку.
|
|
1146
|
+
Параметры: amount, maximum.
|
|
1147
|
+
Примечания реализации / Implementation notes:
|
|
1148
|
+
Add armor points up to maximum; helmet/equipment type is unchanged.
|
|
1149
|
+
|
|
1150
|
+
EN:
|
|
1151
|
+
Adds armor up to maximum and returns the actual increase.
|
|
1152
|
+
Parameters: amount, maximum.
|
|
1153
|
+
Implementation notes / Примечания реализации:
|
|
1154
|
+
Add armor points up to maximum; helmet/equipment type is unchanged."""
|
|
1155
|
+
...
|
|
1156
|
+
|
|
1157
|
+
def motd(self, content, title='PyMod') -> None:
|
|
1158
|
+
"""RU:
|
|
1159
|
+
Открывает MOTD игрока с указанным содержимым и заголовком.
|
|
1160
|
+
Параметры: content, title.
|
|
1161
|
+
Примечания реализации / Implementation notes:
|
|
1162
|
+
Send HTML/text/URL (1..1200 UTF-8 bytes); rendering depends on client.
|
|
1163
|
+
|
|
1164
|
+
EN:
|
|
1165
|
+
Opens the player's MOTD using the supplied content and title.
|
|
1166
|
+
Parameters: content, title.
|
|
1167
|
+
Implementation notes / Примечания реализации:
|
|
1168
|
+
Send HTML/text/URL (1..1200 UTF-8 bytes); rendering depends on client."""
|
|
1169
|
+
...
|
|
1170
|
+
|
|
1171
|
+
def log(message) -> Any:
|
|
1172
|
+
"""RU:
|
|
1173
|
+
Печатает сообщение в серверный журнал с контекстом плагина.
|
|
1174
|
+
Параметры: message.
|
|
1175
|
+
|
|
1176
|
+
EN:
|
|
1177
|
+
Writes a message to the server log in the plugin's context.
|
|
1178
|
+
Parameters: message."""
|
|
1179
|
+
...
|
|
1180
|
+
|
|
1181
|
+
class Disconnect:
|
|
1182
|
+
"""RU:
|
|
1183
|
+
API PyMod: Disconnect. Сигнатура и исходные примечания приведены ниже.
|
|
1184
|
+
|
|
1185
|
+
EN:
|
|
1186
|
+
PyMod API: Disconnect. See the signature and original implementation notes below."""
|
|
1187
|
+
index: int
|
|
1188
|
+
name: str
|
|
1189
|
+
steam_id: str
|
|
1190
|
+
userid: int
|
|
1191
|
+
|
|
1192
|
+
def players(*, alive=None, team=None, permission=None, exclude=None) -> list[Player]:
|
|
1193
|
+
"""RU:
|
|
1194
|
+
API PyMod: players. Сигнатура и исходные примечания приведены ниже.
|
|
1195
|
+
Параметры: alive, team, permission, exclude.
|
|
1196
|
+
|
|
1197
|
+
EN:
|
|
1198
|
+
PyMod API: players. See the signature and original implementation notes below.
|
|
1199
|
+
Parameters: alive, team, permission, exclude."""
|
|
1200
|
+
...
|
|
1201
|
+
|
|
1202
|
+
def broadcast(message, **options) -> Any:
|
|
1203
|
+
"""RU:
|
|
1204
|
+
API PyMod: broadcast. Сигнатура и исходные примечания приведены ниже.
|
|
1205
|
+
Параметры: message.
|
|
1206
|
+
|
|
1207
|
+
EN:
|
|
1208
|
+
PyMod API: broadcast. See the signature and original implementation notes below.
|
|
1209
|
+
Parameters: message."""
|
|
1210
|
+
...
|
|
1211
|
+
|
|
1212
|
+
def cvar(name, value=None) -> Any:
|
|
1213
|
+
"""RU:
|
|
1214
|
+
API PyMod: cvar. Сигнатура и исходные примечания приведены ниже.
|
|
1215
|
+
Параметры: name, value.
|
|
1216
|
+
|
|
1217
|
+
EN:
|
|
1218
|
+
PyMod API: cvar. See the signature and original implementation notes below.
|
|
1219
|
+
Parameters: name, value."""
|
|
1220
|
+
...
|
|
1221
|
+
|
|
1222
|
+
class events:
|
|
1223
|
+
"""RU:
|
|
1224
|
+
API PyMod: events. Сигнатура и исходные примечания приведены ниже.
|
|
1225
|
+
|
|
1226
|
+
EN:
|
|
1227
|
+
PyMod API: events. See the signature and original implementation notes below."""
|
|
1228
|
+
|
|
1229
|
+
@staticmethod
|
|
1230
|
+
def on(name) -> Any:
|
|
1231
|
+
"""RU:
|
|
1232
|
+
API PyMod: events.on. Сигнатура и исходные примечания приведены ниже.
|
|
1233
|
+
Параметры: name.
|
|
1234
|
+
Примечания реализации / Implementation notes:
|
|
1235
|
+
Events: map_start(str), player_join(Player), player_disconnect(Disconnect).
|
|
1236
|
+
|
|
1237
|
+
EN:
|
|
1238
|
+
PyMod API: events.on. See the signature and original implementation notes below.
|
|
1239
|
+
Parameters: name.
|
|
1240
|
+
Implementation notes / Примечания реализации:
|
|
1241
|
+
Events: map_start(str), player_join(Player), player_disconnect(Disconnect)."""
|
|
1242
|
+
...
|
|
1243
|
+
|
|
1244
|
+
@staticmethod
|
|
1245
|
+
def filter(name) -> Any:
|
|
1246
|
+
"""RU:
|
|
1247
|
+
API PyMod: events.filter. Сигнатура и исходные примечания приведены ниже.
|
|
1248
|
+
Параметры: name.
|
|
1249
|
+
Примечания реализации / Implementation notes:
|
|
1250
|
+
Synchronous filter: True consumes. chat_format runs after chat moderation
|
|
1251
|
+
and only for messages that are not registered chat commands.
|
|
1252
|
+
|
|
1253
|
+
EN:
|
|
1254
|
+
PyMod API: events.filter. See the signature and original implementation notes below.
|
|
1255
|
+
Parameters: name.
|
|
1256
|
+
Implementation notes / Примечания реализации:
|
|
1257
|
+
Synchronous filter: True consumes. chat_format runs after chat moderation
|
|
1258
|
+
and only for messages that are not registered chat commands."""
|
|
1259
|
+
...
|
|
1260
|
+
|
|
1261
|
+
class commands:
|
|
1262
|
+
"""RU:
|
|
1263
|
+
API PyMod: commands. Сигнатура и исходные примечания приведены ниже.
|
|
1264
|
+
|
|
1265
|
+
EN:
|
|
1266
|
+
PyMod API: commands. See the signature and original implementation notes below."""
|
|
1267
|
+
|
|
1268
|
+
@staticmethod
|
|
1269
|
+
def client(name, *, permission=None) -> Any:
|
|
1270
|
+
"""RU:
|
|
1271
|
+
API PyMod: commands.client. Сигнатура и исходные примечания приведены ниже.
|
|
1272
|
+
Параметры: name, permission.
|
|
1273
|
+
Примечания реализации / Implementation notes:
|
|
1274
|
+
Client-only command (including legacy binds); callback(context, args).
|
|
1275
|
+
|
|
1276
|
+
Uses an owned ClientCommand filter, so unloading restores engine handling.
|
|
1277
|
+
Server/RCON commands continue to use the py_ namespace via console().
|
|
1278
|
+
|
|
1279
|
+
EN:
|
|
1280
|
+
PyMod API: commands.client. See the signature and original implementation notes below.
|
|
1281
|
+
Parameters: name, permission.
|
|
1282
|
+
Implementation notes / Примечания реализации:
|
|
1283
|
+
Client-only command (including legacy binds); callback(context, args).
|
|
1284
|
+
|
|
1285
|
+
Uses an owned ClientCommand filter, so unloading restores engine handling.
|
|
1286
|
+
Server/RCON commands continue to use the py_ namespace via console()."""
|
|
1287
|
+
...
|
|
1288
|
+
|
|
1289
|
+
@staticmethod
|
|
1290
|
+
def chat(name, *, consume=True, permission=None, help='') -> Any:
|
|
1291
|
+
"""RU:
|
|
1292
|
+
API PyMod: commands.chat. Сигнатура и исходные примечания приведены ниже.
|
|
1293
|
+
Параметры: name, consume, permission, help.
|
|
1294
|
+
Примечания реализации / Implementation notes:
|
|
1295
|
+
Handler(player, args: list[str]); consume decision is synchronous.
|
|
1296
|
+
|
|
1297
|
+
EN:
|
|
1298
|
+
PyMod API: commands.chat. See the signature and original implementation notes below.
|
|
1299
|
+
Parameters: name, consume, permission, help.
|
|
1300
|
+
Implementation notes / Примечания реализации:
|
|
1301
|
+
Handler(player, args: list[str]); consume decision is synchronous."""
|
|
1302
|
+
...
|
|
1303
|
+
|
|
1304
|
+
@staticmethod
|
|
1305
|
+
def console(name, *, permission=None, help='') -> Any:
|
|
1306
|
+
"""RU:
|
|
1307
|
+
Печатает сообщение в игровой консоли игрока.
|
|
1308
|
+
Параметры: name, permission, help.
|
|
1309
|
+
Примечания реализации / Implementation notes:
|
|
1310
|
+
Handler(context, args); available in both client and server console.
|
|
1311
|
+
|
|
1312
|
+
EN:
|
|
1313
|
+
Prints a message in the player's game console.
|
|
1314
|
+
Parameters: name, permission, help.
|
|
1315
|
+
Implementation notes / Примечания реализации:
|
|
1316
|
+
Handler(context, args); available in both client and server console."""
|
|
1317
|
+
...
|
|
1318
|
+
|
|
1319
|
+
@staticmethod
|
|
1320
|
+
def catalog(player=None) -> Any:
|
|
1321
|
+
"""RU:
|
|
1322
|
+
API PyMod: commands.catalog. Сигнатура и исходные примечания приведены ниже.
|
|
1323
|
+
Параметры: player.
|
|
1324
|
+
|
|
1325
|
+
EN:
|
|
1326
|
+
PyMod API: commands.catalog. See the signature and original implementation notes below.
|
|
1327
|
+
Parameters: player."""
|
|
1328
|
+
...
|
|
1329
|
+
|
|
1330
|
+
class timers:
|
|
1331
|
+
"""RU:
|
|
1332
|
+
API PyMod: timers. Сигнатура и исходные примечания приведены ниже.
|
|
1333
|
+
|
|
1334
|
+
EN:
|
|
1335
|
+
PyMod API: timers. See the signature and original implementation notes below."""
|
|
1336
|
+
|
|
1337
|
+
@staticmethod
|
|
1338
|
+
def every(seconds) -> Any:
|
|
1339
|
+
"""RU:
|
|
1340
|
+
Запускает метод периодически с интервалом в секундах, пока плагин активен.
|
|
1341
|
+
Параметры: seconds.
|
|
1342
|
+
Примечания реализации / Implementation notes:
|
|
1343
|
+
A non-overlapping repeating async timer, restarted on each map.
|
|
1344
|
+
|
|
1345
|
+
EN:
|
|
1346
|
+
Runs a method periodically at the given interval in seconds while the plugin is active.
|
|
1347
|
+
Parameters: seconds.
|
|
1348
|
+
Implementation notes / Примечания реализации:
|
|
1349
|
+
A non-overlapping repeating async timer, restarted on each map."""
|
|
1350
|
+
...
|
|
1351
|
+
|
|
1352
|
+
@staticmethod
|
|
1353
|
+
def after(seconds, callback, *args) -> Any:
|
|
1354
|
+
"""RU:
|
|
1355
|
+
API PyMod: timers.after. Сигнатура и исходные примечания приведены ниже.
|
|
1356
|
+
Параметры: seconds, callback.
|
|
1357
|
+
|
|
1358
|
+
EN:
|
|
1359
|
+
PyMod API: timers.after. See the signature and original implementation notes below.
|
|
1360
|
+
Parameters: seconds, callback."""
|
|
1361
|
+
...
|
|
1362
|
+
|
|
1363
|
+
def create_task(coroutine) -> Task[Any]:
|
|
1364
|
+
"""RU:
|
|
1365
|
+
API PyMod: create_task. Сигнатура и исходные примечания приведены ниже.
|
|
1366
|
+
Параметры: coroutine.
|
|
1367
|
+
Примечания реализации / Implementation notes:
|
|
1368
|
+
Owned task: automatically cancelled on reload, unload and map change.
|
|
1369
|
+
|
|
1370
|
+
EN:
|
|
1371
|
+
PyMod API: create_task. See the signature and original implementation notes below.
|
|
1372
|
+
Parameters: coroutine.
|
|
1373
|
+
Implementation notes / Примечания реализации:
|
|
1374
|
+
Owned task: automatically cancelled on reload, unload and map change."""
|
|
1375
|
+
...
|
|
1376
|
+
|
|
1377
|
+
async def run_in_thread(function, /, *args, **kwargs) -> Any:
|
|
1378
|
+
"""RU:
|
|
1379
|
+
API PyMod: run_in_thread. Сигнатура и исходные примечания приведены ниже.
|
|
1380
|
+
Параметры: function.
|
|
1381
|
+
Асинхронный метод: используйте await.
|
|
1382
|
+
Примечания реализации / Implementation notes:
|
|
1383
|
+
Run blocking I/O in a worker. Game APIs are prohibited in that worker.
|
|
1384
|
+
|
|
1385
|
+
Reload waits for the worker to finish. Always use I/O timeouts.
|
|
1386
|
+
|
|
1387
|
+
EN:
|
|
1388
|
+
PyMod API: run_in_thread. See the signature and original implementation notes below.
|
|
1389
|
+
Parameters: function.
|
|
1390
|
+
Asynchronous method: use await.
|
|
1391
|
+
Implementation notes / Примечания реализации:
|
|
1392
|
+
Run blocking I/O in a worker. Game APIs are prohibited in that worker.
|
|
1393
|
+
|
|
1394
|
+
Reload waits for the worker to finish. Always use I/O timeouts."""
|
|
1395
|
+
...
|
|
1396
|
+
|
|
1397
|
+
async def http_get(url, *, timeout=5.0, max_bytes=1048576) -> bytes:
|
|
1398
|
+
"""RU:
|
|
1399
|
+
API PyMod: http_get. Сигнатура и исходные примечания приведены ниже.
|
|
1400
|
+
Параметры: url, timeout, max_bytes.
|
|
1401
|
+
Асинхронный метод: используйте await.
|
|
1402
|
+
Примечания реализации / Implementation notes:
|
|
1403
|
+
GET http(s); return bytes. Uses the bundled stdlib, no pip packages needed.
|
|
1404
|
+
|
|
1405
|
+
EN:
|
|
1406
|
+
PyMod API: http_get. See the signature and original implementation notes below.
|
|
1407
|
+
Parameters: url, timeout, max_bytes.
|
|
1408
|
+
Asynchronous method: use await.
|
|
1409
|
+
Implementation notes / Примечания реализации:
|
|
1410
|
+
GET http(s); return bytes. Uses the bundled stdlib, no pip packages needed."""
|
|
1411
|
+
...
|
|
1412
|
+
from ._sdk_native import ServerRequiredError as ServerRequiredError
|
|
1413
|
+
__all__ = ['log', 'PlayerMovement', 'Vector', 'Movement', 'Buttons', 'PlayerFlags', 'MoveType', 'Color', 'Position', 'PlayerActions', 'WeaponId', 'WeaponState', 'AmmoState', 'Rendering', 'PlayerStateHelpers', 'Team', 'Box', 'Zone', 'Player', 'Disconnect', 'players', 'broadcast', 'cvar', 'events', 'commands', 'timers', 'create_task', 'run_in_thread', 'http_get', 'CommandContext', 'config', 'storage', 'permissions', 'targeting', 'server', 'database', 'Menu', 'MenuItem', 'web', 'hooks', 'HookResult', 'Entity', 'EntityState', 'entities', 'trace', 'Trace', 'Hull', 'Solid', 'sounds', 'resources', 'cvars', 'Cvar', 'CvarFlags', 'CvarChange', 'Hud', 'PlayerSpawn', 'PlayerDeath', 'RoundEvent', 'GameMessage', 'cs', 'CsInfo', 'CsContext', 'CsSnapshot', 'DamageType', 'CsHookContext', 'CsHookSnapshot', 'CsTrace', 'CsMovement', 'CsPhysent', 'GameRulesState', 'CsLifecycleRecord', 'effects', 'Packet', 'services', 'voice', 'chat', 'i18n', 'tr', 'SQLite', 'Table', 'Record', 'Model', 'Sound', 'Sprite', 'Music', 'Plugin', 'Players', 'PlayerGroup', 'command', 'console_command', 'every', 'hook', 'listen', 'service', 'page', 'hook_events', 'Event', 'HookEvent', 'HookSnapshot', 'Cooldown', 'chance', 'wait', 'Config', 'ConfigField', 'ServerRequiredError']
|