EngineRestoreObjectGroupPhysicalProperties: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Initial version (by SublimeText.Mediawiker))
 
(There is no "property" argument)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
__NOTOC__  
__NOTOC__  
{{Client function}}
{{Client function}}
{{New feature/item|3.0157|1.5.7|19626|This function restores physical property of given properties group.}}
{{New feature/item|3.0157|1.5.7|19626|This function restores all physical properties of given properties group.}}


==Syntax==  
==Syntax==  
<syntaxhighlight lang="lua">bool engineRestoreObjectGroupPhysicalProperties ( int groupID, objectgroup-modifiable property )</syntaxhighlight>  
<syntaxhighlight lang="lua">bool engineRestoreObjectGroupPhysicalProperties ( int groupID )</syntaxhighlight>  
===Required Arguments===
===Required Arguments===
*'''groupID''': the id of physical properties group which you wish to restore a property of.
*'''groupID''': the id of physical properties group which you wish to restore.
*'''objectgroup-modifiable''': the property which you wish to restore, as per table below.


===Returns===
===Returns===
Returns '''true''' if everything went well, error is raised otherwise.
Returns '''true''' if everything went well, error is raised otherwise.
===Properties===
{{Physical_Properties}}


==Example==  
==Example==  
<section name="Client" class="client" show="true">
<section name="Client" class="client" show="true">
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
function restoreProperty(_, group, property)
function restorePhysicalGroup(_, group)
     engineRestoreObjectGroupPhysicalProperties(tonumber(group), property)
     engineRestoreObjectGroupPhysicalProperties(tonumber(group))
end
end
addCommandHandler ( "restoreProperty", restoreProperty )
addCommandHandler ( "restorePhysicalGroup", restorePhysicalGroup )
--restoreProperty(120, "special_col_response")
--restorePhysicalGroup(120)
</syntaxhighlight>
</syntaxhighlight>
</section>
</section>
==Requirements==
{{Requirements|n/a|1.5.7-9.19626|}}


==See Also==
==See Also==
{{Client_object_functions}}
{{Client_object_functions}}

Latest revision as of 22:02, 17 May 2024

This function restores all physical properties of given properties group.

Syntax

bool engineRestoreObjectGroupPhysicalProperties ( int groupID )

Required Arguments

  • groupID: the id of physical properties group which you wish to restore.

Returns

Returns true if everything went well, error is raised otherwise.

Example

Click to collapse [-]
Client
function restorePhysicalGroup(_, group)
    engineRestoreObjectGroupPhysicalProperties(tonumber(group))
end
addCommandHandler ( "restorePhysicalGroup", restorePhysicalGroup )
--restorePhysicalGroup(120)

Requirements

Minimum server version n/a
Minimum client version 1.5.7-9.19626

Note: Using this feature requires the resource to have the above minimum version declared in the meta.xml <min_mta_version> section. e.g. <min_mta_version client="1.5.7-9.19626" />

See Also

Shared