gta.createPickup: Difference between revisions

From GTA Connected
Jump to navigation Jump to search
No edit summary
No edit summary
Line 3: Line 3:
|type = function
|type = function
|name = gta.createPickup
|name = gta.createPickup
|parameters = int model, [ Vec3 position = Vec3(0.0,0.0,0.0), int pickupType = 0 ]
|parameters = int model, [ Vec3 position = Vec3(0.0,0.0,0.0), int pickupType = 2 ]
|parameter1 = int model The pickup model ID.
|parameter1 = int model The pickup model ID.
|parameter2 = Vec3 position optional Vec3(0.0,0.0,0.0) The position for the pickup.
|parameter2 = Vec3 position optional Vec3(0.0,0.0,0.0) The position for the pickup.
Line 11: Line 11:
|usage = add a pickup, use the [[addToWorld|addToWorld]] function afterwards to add the pickup to the players games
|usage = add a pickup, use the [[addToWorld|addToWorld]] function afterwards to add the pickup to the players games
|returnInfo = a handle to the pickup
|returnInfo = a handle to the pickup
|notes = Please note that pickup type 0 is invalid.
}}
}}

Revision as of 16:06, 24 July 2021

gta.createPickup

Signature: Pickup The pickup handle. gta.createPickup(int model, [ Vec3 position = Vec3(0.0,0.0,0.0), int pickupType = 2 ])

Usage: add a pickup, use the addToWorld function afterwards to add the pickup to the players games

Parameters

int model The pickup model ID.
Vec3 position optional Vec3(0.0,0.0,0.0) The position for the pickup.
int pickupType optional 0 The pickup type.

Return

Pickup The pickup handle.

On failure: null n/a