RestoreWorldModel: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Remove obsolete Requirements section)
No edit summary
Line 8: Line 8:
==Syntax==
==Syntax==
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
bool restoreWorldModel ( int modelID, float radius, float x, float y, float z [, int iInterior = -1 ] )
bool restoreWorldModel ( int modelID, float radius, float x, float y, float z [, int interior = -1 ] )
</syntaxhighlight>
</syntaxhighlight>


Line 17: Line 17:
*'''y:''' A floating point number representing the Y coordinate on the map.
*'''y:''' A floating point number representing the Y coordinate on the map.
*'''z:''' A floating point number representing the Z coordinate on the map.
*'''z:''' A floating point number representing the Z coordinate on the map.
===Optional Arguments===
{{New items|3.0132|1.3.2|
{{New items|3.0132|1.3.2|
*'''iInterior:'''  
*'''interior:''' The interior ID to apply the restoral to. Some objects in interior 13 show in all interiors so if you want to restore everything in interior 0 also restore everything in interior 13. A value of -1 here will affect all interiors.
}}
}}


===Returns===
===Returns===
Returns ''true'' if the world object was restored, ''false'' otherwise.
Returns ''true'' if the world object was restored, ''false'' if invalid arguments were passed.


==Example==  
==Example==  

Revision as of 17:16, 7 December 2025

This function restoring a removed world object, reversing the effect of removeWorldModel.

You may use restoreAllWorldModels to restore all world models removed with this function.

Syntax

bool restoreWorldModel ( int modelID, float radius, float x, float y, float z [, int interior = -1 ] )

Required Arguments

  • modelID: A whole integer specifying the GTASA object model ID.
  • radius: A floating point number representing the radius that will be eliminated.
  • x: A floating point number representing the X coordinate on the map.
  • y: A floating point number representing the Y coordinate on the map.
  • z: A floating point number representing the Z coordinate on the map.

Optional Arguments

  • interior: The interior ID to apply the restoral to. Some objects in interior 13 show in all interiors so if you want to restore everything in interior 0 also restore everything in interior 13. A value of -1 here will affect all interiors.

Returns

Returns true if the world object was restored, false if invalid arguments were passed.

Example

Remove every lamp post (object 1226) besides Grove Street.

removeWorldModel(1226, 4000, 0, 0, 0, -1)
restoreWorldModel(1226, 50, 2489, -1665, 13, -1)

Changelog

Version Description
1.3.1-9.04636 Added iInterior argument

See Also

Client world functions



Building functions


Object functions