Bomb
| Call | Returns | What it tells you |
|---|---|---|
getBomb() | BombState? | The currently planted bomb, or nil if no bomb is in play. |
getBombTime() | number? | Seconds until the bomb detonates (clamped to 0 if past). nil when there’s no bomb. |
isBombPlanted() | boolean | true while a bomb is in play. |
isBombDefusing() | boolean | true while someone is actively defusing. |
isBombDefused() | boolean | true once the bomb has been defused this round. |
isBombExploded() | boolean | true once the bomb has detonated this round. |
getPlanting() | PlantingState? | Info about an in-progress plant (yours or someone else’s). nil when nobody’s planting. |
Bomb signals
| Signal | When your callback runs |
|---|---|
onBombPlanted | (bomb): a bomb just appeared |
onBombDefused | (bomb): the bomb was just defused |
onBombExploded | (bomb): the bomb just detonated |
onBombCleared | (): the bomb is gone (round ended, cleanup, etc.) |
onPlantingStarted | (planting): someone started planting |
onPlantingEnded | (planting): someone stopped planting (cancelled or finished) |
Hostages
| Call | Returns | What it tells you |
|---|---|---|
getHostages() | { [string]: HostageState } | Every hostage model currently tagged in the world. Keys are internal ids (the model’s string id). |
getHostage(key) | HostageState? | One entry from getHostages(), or nil if that hostage left. |
getRescueRemaining(hostage) | number? | Seconds left on an in-progress rescue. nil when nobody is rescuing it. |
getRescueProgress(hostage) | number | Rescue progress from 0 to 1. 0 when nobody is rescuing. |
getHostages(), getHostage(), or a signal callback into the rescue helpers. See HostageState.
Hostage signals
| Signal | When your callback runs |
|---|---|
onHostageAdded | (key, hostage): a hostage model was tagged and tracked |
onHostageRemoved | (key, hostage): a hostage left the world |
onHostageChanged | (key, hostage): state updated (idle, carrying, rescue started, etc.) |
Gamemode
| Call | Returns | What it tells you |
|---|---|---|
getGamemode() | string? | The current gamemode, e.g. "Bomb Defusal", "Hostage Rescue", "Deathmatch". |
getServerGamemode() | string? | The server’s matchmaking mode, e.g. "Competitive". |
isBombDefusal() / isHostageRescue() / isDeathmatch() | boolean | Shortcuts for checking the gamemode. |
isCompetitive() | boolean | true on competitive servers. |
Gamemode signals
| Signal | When your callback runs |
|---|---|
onGamemodeChanged | (gamemode): the gamemode changed |
onServerGamemodeChanged | (serverGamemode): the server’s matchmaking mode changed |
Dropped items
| Call | Returns | What it tells you |
|---|---|---|
getDroppedItems() | { DroppedItem } | Every weapon, grenade, and bomb lying on the ground right now. Empty in Deathmatch. |
getDroppedItem(model) | DroppedItem? | One dropped item by its model, or nil. |
Dropped item signals
| Signal | When your callback runs |
|---|---|
onDroppedItemAdded | (item): something was dropped on the ground |
onDroppedItemRemoved | (item): a dropped item was picked up or despawned |