Scripting/Squirrel/Functions/ShowMapObject: Difference between revisions

From Vice City Multiplayer
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing
No edit summary
No edit summary
 
(One intermediate revision by one other user not shown)
Line 27: Line 27:
}
}
</source>
</source>
- Xmair.


=== Notes ===
=== Notes ===
Line 36: Line 34:


{{Scripting/Squirrel/Functions/Object_Functions}}
{{Scripting/Squirrel/Functions/Object_Functions}}
[[Category:Scripting/Squirrel/Functions/Object_Functions]]

Latest revision as of 18:32, 30 January 2017

This function will show an object on the map if the map was hidden using HideMapObject or RawHideMapObject

Syntax

ShowMapObject( ObjectID , VectorX, VectorY, VectorZ );

Arguments

  • int ObjectID - The ID of the object, must be an integer.
  • float VectorX - The vector x of the hidden object. Should be float.
  • float VectorY - The vector y of the hidden object. Should be float.
  • float VectorZ - The vector z of the hidden object. Should be float.

Example

function onPlayerCommand( player, cmd, text );
{
 if ( cmd == "hideobj" )
 {
   HideMapObject ( 379 , -1721.86 , -293.002 , 15.1086 );
   MessagePlayer ( "You've successfully hidden the army gate!" , player );
 }
 else if ( cmd == "showobj" )
 {
  ShowMapObject ( 379 , -1721.86 , -293.002 , 15.1086 );
  MessagePlayer ( "The army gate is no longer hidden!" , player );
 }
}

Notes

Call onPlayerCommand were used in this example. More info about them in the corresponding pages.

Related Functions