SetWindVelocity

From Multi Theft Auto: Wiki
Revision as of 15:26, 22 December 2011 by Lolern (talk | contribs) (→‎Example)
Jump to navigation Jump to search

This function changes the wind velocity in San Andreas. This affects just the trees.

Syntax

bool setWindVelocity ( float velocityX, float velocityY, float velocityZ )

Required Arguments

  • velocityX: The velocity on the x-coordinate
  • velocityY: The velocity on the y-coordinate
  • velocityZ: The velocity on the z-coordinate

Returns

Returns true if successful, false otherwise.

Example

This example shows how to make a set wind velocity command.

Click to collapse [-]
Client
function setVelocity(command, x, y, z)
	if x and y and z then
		setWindVelocity (x, y, z)
		outputChatBox("You were set wind velocity to x: "..x.." y: "..y.." z: "..z)
	else
		outputChatBox("Syntax is: /setvelocity [x] [y] [z]")
	end
end
addCommandHandler("setvelocity", setVelocity)

See Also

Shared