Scripting/Squirrel/Functions/Pickups/CreatePickup
From VC-MP Wiki
This function will create a new pickup.
Syntax
bool CreatePickup( int model, Vector pos [, Player plr ] )
Arguments
- model - The pickup model that we want to place.
- pos - The position to where the pickup should be created
- plr - If you want to create the pickup for a player only this is the pointer of the player
Example
This example will create a pickup when a player types /c pickup.
function onPlayerCommand( player, cmd, text ) { local Pos = player.Pos; CreatePickup( 336, Vector( Pos.x, Pos.y, Pos.z ) ); }
Notes
The call onPlayerCommand was used in in this example. More info about this in the corresponding page.
