bs_weapons
weapon attachments as real items, on a wheel.
Generated from the Lua sources in resources/[beyond]/bs_weapons/. 40 entries. The description column is the comment above the line in the code, so if it’s empty nobody wrote one yet.
Exports
Section titled “Exports”Call with exports.bs_weapons:Name(...) from the same side.
| Name | Side | Where | Description |
|---|---|---|---|
AttachmentsFor | client | client/cl_main.lua:942 | The same list the server export gives, for anything client-side that needs to know what fits what - the staff menu builds its weapon rows from this. |
ClientMagSize | client | client/cl_main.lua:973 | lets bs_inventory cap ammo-box top-ups at the real mag size |
FittedOn | client | client/cl_main.lua:960 | |
Holster | client | client/cl_holster.lua:157 | |
IsHolstered | client | client/cl_holster.lua:158 | |
IsSuppressed | client | client/cl_main.lua:913 | IS THIS SHOT SILENT? A YES/NO, WHICH IS WHAT bs_emotes NEEDED AND HAD NO WAY TO ASK. |
NameOfHash | client | client/cl_main.lua:264 | Hash -> weapon NAME, from the same table. |
NoiseScale | client | client/cl_main.lua:872 | bs_emotes broadcasts gunshots as noise; a suppressed weapon should broadcast a much smaller one. |
OpenWheel | client | client/cl_main.lua:959 | |
SyncedAmmo | client | client/cl_main.lua:237 | What the server last told us was left in this weapon. |
SyncedAmmoByHash | client | client/cl_main.lua:253 | WHY THE SPAWN-RESTORE PATH STILL HANDED OVER 0 ROUNDS. |
AttachmentsFor | server | server/sv_main.lua:348 | WHAT FITS THIS WEAPON, AS ITEMS. |
Fitted | server | server/sv_main.lua:340 | |
MagInfo | server | server/sv_main.lua:272 | Everything a caller needs about a weapon’s ammo, in one place. |
MagSize | server | server/sv_main.lua:286 | |
NoiseScale | server | server/sv_main.lua:328 | |
SavedAmmo | server | server/sv_main.lua:115 | |
SetSavedAmmo | server | server/sv_main.lua:129 | SETTING the saved count, for the one caller that legitimately knows better than the client: an admin spawning a weapon to test with. |
Callbacks
Section titled “Callbacks”Server callbacks are called from a client with BSB.Await(name, timeoutMs, ...). Client callbacks are called from the server with BSB.AwaitClient(src, name, timeoutMs, ...).
| Name | Direction | Where | Description |
|---|---|---|---|
weapons:fit | client -> server | server/sv_main.lua:178 | |
weapons:remove | client -> server | server/sv_main.lua:210 | |
weapons:returnAmmo | client -> server | server/sv_main.lua:293 | After an extended mag comes off: rounds that no longer fit go back to the bag as whole boxes. |
weapons:state | client -> server | server/sv_main.lua:164 | WHY THE COUNTS COME FROM HERE. |
Events
Section titled “Events”“net” means the handler is registered with RegisterNetEvent, so the other side can trigger it. “local” is AddEventHandler only (same side, or game events).
| Name | Side | Type | Where | Description |
|---|---|---|---|---|
bs:hook:player:loaded | server | local | server/sv_main.lua:67 | |
bs:hook:player:spawned | client | local | client/cl_dryfire.lua:125 | |
bs:hook:player:unloaded | client | local | client/cl_holster.lua:153 | |
bs:hook:player:unloaded | server | local | server/sv_main.lua:76 | |
bs:ui:opened | client | local | client/cl_preview.lua:231 | If any other menu takes the screen, this camera has no business being up. |
bs:weapons:forgetAll | client | local | client/cl_main.lua:966 | An inventory wipe removed the guns from the ped (see bs_inventory’s bs:inventory:wiped handler). |
bs:weapons:holdingIs | server | net | server/sv_ammodebug.lua:125 | |
bs:weapons:hotbarWeapon | client | local | client/cl_holster.lua:142 | Pressing the quick-bar slot for the weapon ALREADY IN YOUR HANDS puts it away, rather than re-drawing the thing you are holding. |
bs:weapons:reportAmmo | server | net | server/sv_main.lua:98 | THE CLIENT REPORTING WHAT IS LEFT. |
bs:weapons:sync | client | net | client/cl_main.lua:225 | WHY THIS NOW KEEPS THE SECOND ARGUMENT. |
bs:weapons:whatAmIHolding | client | net | client/cl_dryfire.lua:299 | The server asks what is actually in our hands, because it cannot see it reliably - GetSelectedPedWeapon is networked and lags a draw. |
onResourceStop | client | local | client/cl_magcheck.lua:247 | Nothing should be left mid-animation by a restart or a death - both stop the clip, but neither clears the flag, and a stuck flag means SHIFT+R never works again for that session. |
playerDropped | server | local | server/sv_main.lua:84 |
Commands
Section titled “Commands”| Command | Side | Where | Description |
|---|---|---|---|
/attachdebug | client | client/cl_main.lua:827 | |
/bs_holster | client | client/cl_holster.lua:131 | |
/dryfire | client | client/cl_dryfire.lua:333 | This file has now been “fixed” three times, and twice the fix was correct while something upstream quietly prevented it from running. |
/giveammo | server | server/sv_ammodebug.lua:97 | |
/weaponinfo | server | server/sv_main.lua:370 |
bs19.org · Privacy · Terms · Cookie settings