Scripting/Server/Functions/CreatePickup

Creates a pickup; model is a GTA III pickup model id (for example 1362). It respawns after pickup_respawn_time unless you change it.

Syntax

CreatePickup(model, pos)

Arguments

Returns

Pickup or null.

Example

function onPlayerCommand( player, cmd, params )
{
	if ( cmd == "createpickup" )
	{
		local result = CreatePickup( 95, player.Pos );
		MessagePlayer( "CreatePickup returned: " + result, player );
	}
}

This sample was generated from the signature – adapt the values to your gamemode.

Section: Creating world entities

Categories: Server functions | Creating world entities