The Lab
TASK native

TASK_SWAP_WEAPON

returns void5 paramsbuild 1207

Based on its name and signature, here is our best reading:

Tasks ped to swap weapons.

Signature

C
void TASK_SWAP_WEAPON(Ped ped, Any p1, Any p2, Any p3, Any p4); // 0xA21C51255B205245 b1207

Parameters

#NameType
1pedPed
2p1Any
3p2Any
4p3Any
5p4Any

Facts

Facts about TASK_SWAP_WEAPON
Name
TASK_SWAP_WEAPON
Hash
0xA21C51255B205245
Namespace
Returns
void
Game build
1207

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
Citizen.InvokeNative(0xA21C51255B205245, -- TASK_SWAP_WEAPON
  PlayerPedId(), -- Ped ped
  0, -- Any p1
  0, -- Any p2
  0, -- Any p3
  0 -- Any p4
)
JavaScript
Citizen.invokeNative("0xA21C51255B205245", // TASK_SWAP_WEAPON
  PlayerPedId(), // Ped ped
  0, // Any p1
  0, // Any p2
  0, // Any p3
  0 // Any p4
);
C#
Function.Call((Hash)0xA21C51255B205245, // TASK_SWAP_WEAPON
  API.PlayerPedId(), // Ped ped
  0, // Any p1
  0, // Any p2
  0, // Any p3
  0 // Any p4
);
All TASK natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.