SetSurfaceTraction

From Liberty Unleashed Wiki
Revision as of 23:48, 19 October 2010 by Force (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This sets the traction of the specified surface

Syntax

  1. float SetSurfaceTraction( int surface, float value )

Arguments

  • surface - The surface to query. As defined Here
  • value - The value to set the surface traction to

Example

This will set the rubber/rubber surface to a traction level of 1.00 when the player types '/surfacetraction'

  1.  
  2. function onPlayerCommand( pPlayer, szCommand, szText )
  3. {
  4. if ( szCommand == "surfacetraction" )
  5. {
  6. SetSurfaceTraction( SURFACE_RUBBER_RUBBER, 1.00 );
  7. }
  8. return 1;
  9. }
  10.  

Notes

The event onPlayerCommand was used in this example. More info about this in the corresponding page.

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox