GetSurfaceTraction

From Liberty Unleashed Wiki
Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This returns the traction of the queried surface

Syntax

  1. float GetSurfaceTraction( int surface )

Arguments

  • surface - The surface to query. As defined Here

Example

This example will return the surface traction for rubber on road when somebody type /trac

  1.  
  2. function onPlayerCommand( plr, cmd, text )
  3. {
  4. if ( cmd == "trac" )
  5. {
  6. MessagePlayer( "The traction with rubber on roads is currently: " + GetSurfaceTraction( SURFACE_ROAD_RUBBER ), plr );
  7. }
  8. }
  9.  

Notes

The function MessagePlayer and call onPlayerCommand were used in in this example. More info about them in corresponding pages.

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox