CreatePickup

From GTA Network Wiki
Jump to: navigation, search

CreatePickup
Server-Side Function

utilities-terminal.png Server-Side csharp.png C#

Creates a pickup. See Pickup list.

Syntax

Pickup NAPI.Pickup.CreatePickup(PickupHash pickupHash, Vector3 pos, Vector3 rot, int amount, uint respawnTime [, uint dimension = NAPI.GlobalDimension ]);
Pickup NAPI.Pickup.CreatePickup(uint/int model, Vector3 pos, Vector3 rot, bool vehicle, uint respawnTime [, uint dimension = NAPI.GlobalDimension ]);

Required Arguments

- Overload 1:

  • pickupHash: parameter input should be in NetHandle type.
  • pos: parameter input should be in Vector3 type.
  • rot: parameter input should be in Vector3 type.
  • amount: parameter input should be in int type.
  • respawnTime: parameter input should be in uint type.

- Overload 2:

  • model: parameter input should be in uint or int type.
  • pos: parameter input should be in Vector3 type.
  • rot: parameter input should be in Vector3 type.
  • vehicle: parameter input should be in bool type.
  • respawnTime: parameter input should be in uint type.

Optional Arguments:

  • dimension: parameter input should be in uint type.

NOTE: This function returns data in Pickup type.

Usage example(s)

NAPI.Pickup.CreatePickup(pickupHash, pos, rot, amount, respawnTime);
Pickup myPickup = API.CreatePickup(model, pos, rot, vehicle, respawnTime);

Changelog

Version Description
1.0 Release.

References