SetVehiclePanelState: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{Server client function}}
{{Server client function}}
This function allows you to change the state of one of the six panels vehicle's can have. When executed on the server-side resources, the damage will be synched for all players, whereas the change is only client-side if the function is used in a client resource.


==Syntax==
==Syntax==
<syntaxhighlight lang="lua">setVehiclePanelState ( vehicle theVehicle, int panelID, int state )</syntaxhighlight>
<syntaxhighlight lang="lua">bool setVehiclePanelState ( vehicle theVehicle, int panelID, int state )</syntaxhighlight>


==Required Arguments==
==Required Arguments==
*'''theVehicle:''' The vehicle you would like to modify the panel of.
*'''theVehicle:''' The [[vehicle]] you would like to modify the panel of.
*'''panelID:''' 0-6
*'''panelID:''' 0-6
*'''state:''' 0-255 (check what range is effective, it may be much smaller e.g. 0-3)
*'''state:''' 0-255 (check what range is effective, it may be much smaller e.g. 0-3)


==Returns==
==Returns==
Returns ''true'' if it works, ''false'' otherwise
Returns ''true'' if the panel state has been updated, ''false'' otherwise


==See Also==
==See Also==
{{Vehicle functions}}
{{Vehicle functions}}

Revision as of 10:20, 24 January 2008

This function allows you to change the state of one of the six panels vehicle's can have. When executed on the server-side resources, the damage will be synched for all players, whereas the change is only client-side if the function is used in a client resource.

Syntax

bool setVehiclePanelState ( vehicle theVehicle, int panelID, int state )

Required Arguments

  • theVehicle: The vehicle you would like to modify the panel of.
  • panelID: 0-6
  • state: 0-255 (check what range is effective, it may be much smaller e.g. 0-3)

Returns

Returns true if the panel state has been updated, false otherwise

See Also