ResetWindVelocity: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ {{Server client function}} This function resets the wind velocity in San Andreas to its default state. ==Syntax== <syntaxhighlight lang="lua"> bool resetWindVelocity ( ) </syntaxhighlight> ===Re...")
 
(Upgraded examples)
 
Line 12: Line 12:


==Example==
==Example==
This example returns the wind velocity to a player if they use the command 'getwindvelocity'.
<section name="Client" class="client" show="true">
This example returns the wind velocity to a player if they use the command 'resetwindvelocity'.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
function commandResetWindVelocity(player, command)
function commandResetWindVelocity()
   resetWindVelocity()
   resetWindVelocity()
   outputChatBox("Wind velocity reset to default", 0, 255, 0)
   outputChatBox("Wind velocity reset to default", 0, 255, 0)
Line 20: Line 21:
addCommandHandler("resetwindvelocity", commandResetWindVelocity)
addCommandHandler("resetwindvelocity", commandResetWindVelocity)
</syntaxhighlight>
</syntaxhighlight>
</section>
<section name="Server" class="server" show="true">
This example returns the wind velocity for all players if they use the command 'resetwindvelocity'.
<syntaxhighlight lang="lua">
function commandResetWindVelocity()
  resetWindVelocity()
  outputChatBox("Wind velocity reset to default", root, 0, 255, 0)
end
addCommandHandler("resetwindvelocity", commandResetWindVelocity)
</syntaxhighlight>
</section>


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

Latest revision as of 22:00, 2 July 2011

This function resets the wind velocity in San Andreas to its default state.

Syntax

bool resetWindVelocity ( )

Returns

Returns true if successful, false otherwise.

Example

Click to collapse [-]
Client

This example returns the wind velocity to a player if they use the command 'resetwindvelocity'.

function commandResetWindVelocity()
   resetWindVelocity()
   outputChatBox("Wind velocity reset to default", 0, 255, 0)
end
addCommandHandler("resetwindvelocity", commandResetWindVelocity)
Click to collapse [-]
Server

This example returns the wind velocity for all players if they use the command 'resetwindvelocity'.

function commandResetWindVelocity()
   resetWindVelocity()
   outputChatBox("Wind velocity reset to default", root, 0, 255, 0)
end
addCommandHandler("resetwindvelocity", commandResetWindVelocity)

See Also