EngineRestoreObjectGroupPhysicalProperties: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
(There is no "property" argument)
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>

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

This template will be deleted.

See Also