SetWindVelocity: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
Line 17: Line 17:


==Example==
==Example==
This example shows how to make a set wind velocity command.
<section name="Client" class="client" show="true">
<section name="Client" class="client" show="true">
{{Example}}
<syntaxhighlight lang="lua">
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)
</syntaxhighlight>
</section>
</section>


==See Also==
==See Also==
{{Client_world_functions}}
{{Client_world_functions}}

Revision as of 15:26, 22 December 2011

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