ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. setPickupAmmo

Function

setPickupAmmo

ServerPickupsTrilogy Hub only

Changes the amount of ammo in a weapon pickup.

Syntax

bool setPickupAmmo(pickup thePickup, int ammo)

Arguments

thePickuppickup
The pickup.
ammoint
New ammo amount (negative = 0).

Returns

true on success.

Example

local pickup = createPickup(0, 0, 3, 2, 31, 30000, 200)
setPickupAmmo(pickup, 500)

See also