Player.Alpha

From Liberty Unleashed Wiki
Revision as of 15:14, 12 November 2010 by Gudio (Talk | contribs)

Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This Player class variable sets/returns the alpha of the player ped. Note that this settings does not affect weapons or special skins.

Syntax

  1. int player.Alpha
  1. player.Alpha = int alpha

Arguments

  • alpha - The alpha value you wish to set (0...255)

Example 1. Returning

This function needs an example. You can help us complete the wiki by writing one, or maybe even more :o

What does this example do

  1.  
  2. function onPlayerCommand( pPlayer, szCommand, szText )
  3. {
  4. if ( szCommand == "setalpha" )
  5. {
  6. MessagePlayer( "Your alpha state is currently set to " + pPlayer.Alpha, pPlayer );
  7. }
  8. }
  9.  

Notes

--Todo Used functions/events and other notes

Example 2. Setting

This function needs an example. You can help us complete the wiki by writing one, or maybe even more :o

What does this example do

  1.  
  2. function onPlayerCommand( pPlayer, szCommand, szText )
  3. {
  4. if ( szCommand == "setalpha" )
  5. {
  6. if ( szText ) pPlayer.Alpha = text.tointeger();
  7. }
  8. }
  9.  

Notes

--Todo Used functions/events and other notes

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox