usePickup | Multi Theft Auto: Wiki Skip to content

usePickup

Client-side
Server-side
Shared

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


This function is used to simulate the player using a pickup

Syntax

bool usePickup ( pickup thePickup, player thePlayer )
Required Arguments
  • thePickup: The pickup element to be picked up/used.
  • thePlayer: The player to use the pickup.

Returns

  • bool: value

Code Examples

shared

This example gives a random player 100% armor by using a pickup.

local pickup = createPickup(3,3,3,1,100) -- Create a pickup for 100% armor
usePickup(pickup,getRandomPlayer()) -- Make a random player use the pickup (shall recieve 100% armor)