Skip to content

Commit 9ff2d35

Browse files
Update ToggleUsePickupsForPlayer.md (#1270)
* Update ToggleUsePickupsForPlayer.md * Update ToggleUsePickupsForPlayer.md * Update ToggleUsePickupsForPlayer.md --------- Co-authored-by: technetium <[email protected]>
1 parent b090f61 commit 9ff2d35

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

OBJECT/ToggleUsePickupsForPlayer.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ void _TOGGLE_USE_PICKUPS_FOR_PLAYER(Player player, Hash pickupHash, BOOL toggle)
1212
```
1313
Disabling/enabling a player from getting pickups. From the scripts:
1414
OBJECT::_616093EC6B139DD9(PLAYER::PLAYER_ID(), ${pickup_portable_package}, 0);
15-
OBJECT::_616093EC6B139DD9(PLAYER::PLAYER_ID(), ${pickup_portable_package}, 0);
16-
OBJECT::_616093EC6B139DD9(PLAYER::PLAYER_ID(), ${pickup_portable_package}, 1);
17-
OBJECT::_616093EC6B139DD9(PLAYER::PLAYER_ID(), ${pickup_portable_package}, 0);
18-
OBJECT::_616093EC6B139DD9(PLAYER::PLAYER_ID(), ${pickup_armour_standard}, 0);
19-
OBJECT::_616093EC6B139DD9(PLAYER::PLAYER_ID(), ${pickup_armour_standard}, 1);
20-
SET_PLAYER_*
2115
```
2216
2317
## Parameters
24-
* **player**:
25-
* **pickupHash**:
26-
* **toggle**:
18+
* **player**: Player ID. Use [`PLAYER_ID`](#_0x4F8644AF03D0E0D6) for your own player.
19+
* **pickupHash**: Hash of the pickup, obtainable with [`GET_HASH_KEY`](#_0xD24D37CC275948CC)
20+
* **toggle**: boolean that enables/disables the pickup drop (false to disable, true to enable)
2721
22+
## Examples
23+
```lua
24+
-- Toggles the possibility for the player to drop the weapon pickups after death
25+
local pickup = GetHashKey("PICKUP_WEAPON_ADVANCEDRIFLE")
26+
ToggleUsePickupsForPlayer(PlayerId(), pickup, false)
27+
```

0 commit comments

Comments
 (0)