Scripting/Squirrel/Functions/Pickup.Alpha

From Vice City Multiplayer
Revision as of 10:22, 9 March 2016 by Rathore (talk | contribs) (Created page with "== Syntax == <pre>vector Pickup.Alpha = Vector( X, Y, Z )</pre> == Arguments == '''> Pickup''' - The pickup instance. '''> Alpha''' - int alpha 0 to 255. == Example == T...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing

Syntax

vector Pickup.Alpha = Vector( X, Y, Z )

Arguments

> Pickup - The pickup instance.

> Alpha - int alpha 0 to 255.

Example

This example will create a pickup and set its position to the center of map.

function onScriptLoad()
{
   myPickup <- CreatePickup( 284, 1, Vector( -2261.12, 753.12, 211.123 ) );
}

function onPlayerCommand(player, cmd, text)
{
if (cmd =="visible')
{
myPickup.Alpha = 255;
MessagePlayer("The pickup is visible now",player);
}
else if (cmd =="invisible')
{
myPickup.Alpha = 0;
MessagePlayer("The pickup is invisible now",player);
}
}